var iWidth = 0;
var iHeight = 0;
var iLeft = 0;
var iTop = 0;
var iIntId = null;
var oBox = new Object();
var oInnerWrap = new Object();
var iI = 1;

function setValue(sEffect) {
	if(sEffect == "screen_up") {
		iWidth = iWidth + 37;
		iHeight = iHeight + 18;
		iLeft = iLeft - 50;
	}
	if(sEffect == "screen_down") {
		iWidth = iWidth - 37;
		iHeight = iHeight - 18;
		iLeft = iLeft + 50;
	}
}
/*
function createContentElements() {
	document.getElementById("box1close").style.display = "block";
	document.getElementById("box1content").style.display = "block";
	document.getElementById("box1content").innerHTML = "<img src='" + load.src + "' style='margin-top:173px; margin-left:328px;' />";
	setTimeout(showContent, 1000);
}
function showContent() {
	document.getElementById("box1content").innerHTML = frame.document.body.innerHTML;
}
function startAnim(sEffect) {
	setValue(sEffect);
	if(sEffect == "screen_up") {
		if(iI <= 13) {
			setElementStyle();
			iI++;
		}
		else {
			clearInterval(iIntId);
			oBox.style.left = 15 + "px";
			oBox.style.top = 15 + "px";
			oBox.style.width = 705 + "px";
			oBox.style.height = 420 + "px";
			createContentElements();
		}
	}
	else {
		if(iI >= 1) {
			setElementStyle();
			iI--;
		}
		else {
			clearInterval(iIntId);
			oBox.style.width = 200 + "px";
			oBox.style.height = 112 + "px";
			oBox.style.left = 735 + "px";
			oBox.style.top = 15 + "px";
			oInnerWrap.className = "box1out";
			createBoxAttribute();
		}
	}
}
*/
function setElementStyle() {
	oBox.style.width = 208 + iWidth + "px";
	oBox.style.height = 120 + iHeight + "px";
	oBox.style.left = 731 + iLeft + "px";
	oBox.style.top = 11 + iTop + "px";
}
/*
function closeScreen() {
	document.getElementById("box1close").style.display = "none";
	document.getElementById("box1content").innerHTML = "";
	document.getElementById("box1content").style.display = "none";
	iIntId = setInterval("startAnim('screen_down') ", 20);
}
*/
function mouseEvent(event) {
	oBox = document.getElementById("box1");
	/*oInnerWrap = document.getElementById("innerwrap");*/
	if(event.type == "mouseover") {
		/*oInnerWrap.className = "box1over";*/
		oBox.className = "box1over";
		oBox.style.width = 208 + "px";
		oBox.style.height = 120 + "px";
		oBox.style.left = 731 + "px";
		oBox.style.top = 11 + "px";
		/*oInnerWrap.style.cursor = "pointer";*/
	}
	if(event.type == "mouseout") {
		oBox.style.width = 200 + "px";
		oBox.style.height = 112 + "px";
		oBox.style.left = 735 + "px";
		oBox.style.top = 15 + "px";
		oBox.className = "box1out";
		/*oInnerWrap.className = "box1out";
		oInnerWrap.style.cursor = "default";*/
	}
	/*
	if(event.type == "click"){
		removeBoxAttribute();
		oInnerWrap.className = "box1screenbg";
		iIntId = setInterval("startAnim('screen_up') ", 20);
	}*/
}
/*
function removeBoxAttribute() {
	destroyEventListener("innerwrap", "mouseover", mouseEvent);
	destroyEventListener("innerwrap", "mouseout", mouseEvent);
	destroyEventListener("innerwrap", "click", mouseEvent);
	oInnerWrap.style.cursor = "default";
}
*/
function createBoxAttribute() {
	createEventListener("box1", "mouseover", mouseEvent);
	createEventListener("box1", "mouseout", mouseEvent);
	/*createEventListener("innerwrap", "mouseover", mouseEvent);
	createEventListener("innerwrap", "mouseout", mouseEvent);
	createEventListener("innerwrap", "click", mouseEvent);*/
	createEventListener("box2", "mouseover", mouseEvent2);
	createEventListener("box2", "mouseout", mouseEvent2);
	createEventListener("box3", "mouseover", mouseEvent3);
	createEventListener("box3", "mouseout", mouseEvent3);
}

function mouseEvent2(event) {
	oBox = document.getElementById("box2");
	if(event.type == "mouseover") {
		oBox.className = "box2over";
		oBox.style.width = 208 + "px";
		oBox.style.height = 120 + "px";
		oBox.style.left = 731 + "px";
		oBox.style.top = 138 + "px";
	}
	if(event.type == "mouseout") {
		oBox.style.width = 200 + "px";
		oBox.style.height = 112 + "px";
		oBox.style.left = 735 + "px";
		oBox.style.top = 142 + "px";
		oBox.className = "box2out";
	}
}

function mouseEvent3(event) {
	oBox = document.getElementById("box3");
	if(event.type == "mouseover") {
		oBox.className = "box3over";
		oBox.style.width = 208 + "px";
		oBox.style.height = 120 + "px";
		oBox.style.left = 731 + "px";
		oBox.style.top = 265 + "px";
	}
	if(event.type == "mouseout") {
		oBox.style.width = 200 + "px";
		oBox.style.height = 112 + "px";
		oBox.style.left = 735 + "px";
		oBox.style.top = 269 + "px";
		oBox.className = "box3out";
	}
}
