


function imageOpen(str){
	
	document.getElementById("overlay").style.display = "block";
	document.getElementById("window_image").src = str;
	window.scrollTo(0,0)
}

function imageClose(){
	document.getElementById("overlay").style.display = "none";
	document.getElementById("window_image").src = "images/loading.gif";
	
}
function videoOpen(str){

	var pre = "<div id=\"button\" onclick=\"javascript:restore()\"></div>";
	pre = pre + " <object width=\"640\" height=\"385\"> " +
			  	" <param name=\"movie\" value=\""+str+"\"> </param>" +
			    " <param name=\"allowFullScreen\" value=\"true\"> </param>" +
			  	" <param name=\"allowscriptaccess\" value=\"always\"> </param>" +
			  	" <embed src=\""+str+"\" type=\"application/x-shockwave-flash\" allowscriptaccess=\"always\" allowfullscreen=\"true\" width=\"640\" height=\"385\"> " +
			  			"</embed> " +
			  			"</object>";
	
	document.getElementById("window").innerHTML = pre;
	document.getElementById("overlay").style.display = "block";		  
	window.scrollTo(0,0)
}
function flashOpen(str, w, h){
	
	var pre = "<div id=\"button\" onclick=\"javascript:restore()\"></div>";
	pre = pre + "<object width=\""+w+"\" height=\""+h+"\"> <embed src=\""+str+"\" type=\"application/x-shockwave-flash\" width=\""+w+"\" height=\""+h+"\"> </embed> </object>";
	
	document.getElementById("window").innerHTML = pre;
	document.getElementById("overlay").style.display = "block";
	window.scrollTo(0,0)
}
function restore(){

	document.getElementById("window").innerHTML = "<div id=\"button\" onclick=\"javascript:imageClose()\"></div>"+
		"<img id=\"window_image\" src=\"images/loading.gif\" alt=\"Image Loading\"/>";
	document.getElementById("overlay").style.display = "none";
}
