// JavaScript Document


var htdiv=345;
function showVideo(name){
var video='<center><embed src="'+name+'" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="320"  id="mediaplayer"></center>';
		document.getElementById('container').innerHTML=video;
}

function hiddenVideo(){
var video='<center><embed height="319" width="479" autostart="true" flashvars="width=479&height=319&file=.flv&amp;image=videos.jpg" allowfullscreen="true" quality="high" name="mediaplayer" id="mediaplayer" style="" src="videos/mediaplayer.swf" type="application/x-shockwave-flash" wmode="transparent"/></center>';
		document.getElementById('container').innerHTML=video;
}

function lightBoxHeight(st,height,name){
	if(st==1){
		document.getElementById('lightBox').style.display='block';
		document.getElementById('lightBoxBlack').style.display='block';
		if(height<=htdiv){
		setTimeout('scrollHeight(1,'+height+',"'+name+'")',1);
		}
	}
	else if(st==0){
		if(height>=1){
			setTimeout('scrollHeight(0,'+height+',"'+name+'")',1);
		}
	}
}

function scrollHeight(st,height,name){
	if(st==1){
	scroll(0,0);
	document.getElementById('lightBox').style.height=height+'px';
	height=height+10;
	setTimeout('lightBoxHeight(1,'+height+',"'+name+'")',1);
		if(height>=htdiv){
			document.getElementById('mediaplayer').style.display='block';
		}
	}
	else if(st==0){
	document.getElementById('lightBox').style.height=height+'px';
	height=height-10;
	setTimeout('lightBoxHeight(0,'+height+',"'+name+'")',1);
		if(height<=1){
			document.getElementById('mediaplayer').style.display='none';
			document.getElementById('lightBox').style.display='none';
			document.getElementById('lightBoxBlack').style.display='none';
		}
	}
}