
var int1;
function toPage(page){
	if (page != "")
	{
		for(var i=1;i<=11;i++) {
			document.getElementById(i).style.display="none";
			document.getElementById(i).style.margin = "795px 0 0 0";
			document.getElementById(i).style.height = "0px";
		}
		document.getElementById(page).style.display="";
		window.clearInterval(int1);
		int1=self.setInterval("clock("+page+")",1);
	}
}
function clock(page){
	var m = document.getElementById(page).style.margin;
 	var n = parseInt(m);
	var m1 = document.getElementById(page).style.height;
 	var n1 = parseInt(m1);
 	n = n-15;
 	n1 = n1+15;
 	if (page == 1)
 	{
 		document.getElementById(page).style.margin=n+"px 0 0 -12px";
 	}
 	else
 	{
 		document.getElementById(page).style.margin=n+"px 0 0 0";
 	}
 	document.getElementById(page).style.height=n1+"px";
 	if(n == 0) int1=window.clearInterval(int1);
}
function init(){
	document.getElementById('left').style.height="0px";
	if(typeof int2 == 'undefined') int2=self.setInterval("clock2()",1.6);	
}
function clock2(){
	var m = document.getElementById('left').style.height;
 	var n = parseInt(m);
 	n += 10;
  	document.getElementById('left').style.height=n+"px";
 	if(n == 845) {
 		int1=window.clearInterval(int2);
 		document.getElementById('left1').style.display="";	
 		document.getElementById('left2').style.display="";	
 	}
}

function makevisible(cur,which){   
if (which==0)
cur.filters.alpha.opacity=100
else
cur.filters.alpha.opacity=20
}


function playSound() 
{
	//document.all.sound.src = "sound/haishi.mp3";
}

function clearSound()
{
	//document.all.sound.src = "";
}

function centerPage1()
{
	var margin = 0;
	var width1 = window.screen.width;
	if ((typeof(document.body) != 'undefined') && typeof(document.body.childNodes[0]) != 'undefined')
	{
		var width2 = document.body.childNodes[0].style.width;
		//alert("clieng width="+width2);
			margin = (parseInt(width1) - parseInt(width2))/2;
		document.body.style.marginLeft = margin;
	}
	
}

function centerPage()
{
	var margin = 0;
	var width1 = window.screen.width;
	
	if (typeof(document.body) != 'undefined')
	{
		var width2 = 989
			margin = (parseInt(width1) - parseInt(width2))/2;
		document.body.style.marginLeft = margin;
	}
	
}

