playBOX = function() {

	var getElm = document.getElementsByTagName("a");

	openBox = "p001";

	for (var i=0; i<getElm.length; i++) {

		getElm[i].onclick=function() {

			if (this.className.indexOf("playbox") != -1) {

			document.getElementById(openBox).style.display = "none";

			openBox = this.href;

			openBox =  openBox.substr(openBox.length - 4);

			document.getElementById(openBox).style.display = "block";

			}

			if (this.className.indexOf("closebox") != -1) {

			document.getElementById(openBox).style.display = "none";

			}

		}

	}

}

if (window.attachEvent) window.attachEvent("onload", playBOX);
