
function showFlash(flashpath,flashW,flashH) {

	changeFlashVid(flashpath,flashW,flashH);
	showdeadcenterdiv(flashW,flashH,'flashdiv');
	
}

function changeFlashVid(fname,width,height) {
	
	document.getElementById("flashdiv").innerHTML = "";
	
	//str = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="'+width+'" height="'+height+'">              <param name="movie" value="'+fname+'" />              <param name="quality" value="high" />              <embed src="'+fname+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+width+'" height="'+height+'"></embed> </object>';
	//str = ""+fname;
	str = "<a href='javascript:' onclick=\"hideDiv('flashdiv')\" class='close_iframe'><img src='images/close.png' border='0' alt='Close' /></a><br><iframe src='"+fname+"' class='iframe_flash' width='"+width+"' height='"+height+"'></iframe>"
	
	document.getElementById("flashdiv").innerHTML = str;
	
}

function showDiv (divid) {
	var o=document.getElementById(divid); 
	var r=o.style; 
	r.display = "block"; 
}
function hideDiv (divid) {
	var o=document.getElementById(divid); 
	var r=o.style; 
	r.display = "none"; 
}



function showdeadcenterdiv(Xwidth,Yheight,divid) { 
	// First, determine how much the visitor has scrolled 
	
	var scrolledX, scrolledY; 
	if( self.pageYOffset ) { 
		scrolledX = self.pageXOffset; 
		scrolledY = self.pageYOffset; 
	} else if( document.documentElement && document.documentElement.scrollTop ) { 
		scrolledX = document.documentElement.scrollLeft; 
		scrolledY = document.documentElement.scrollTop; 
	} else if( document.body ) { 
		scrolledX = document.body.scrollLeft; 
		scrolledY = document.body.scrollTop; 
	} 
	
	// Next, determine the coordinates of the center of browser's window 
	
	var centerX, centerY; 
	if( self.innerHeight ) { 
		centerX = self.innerWidth; 
		centerY = self.innerHeight; 
	} else if( document.documentElement && document.documentElement.clientHeight ) { 
		centerX = document.documentElement.clientWidth; 
		centerY = document.documentElement.clientHeight; 
	} else if( document.body ) { 
		centerX = document.body.clientWidth; 
		centerY = document.body.clientHeight; 
	} 
	
	// Xwidth is the width of the div, Yheight is the height of the 
	// div passed as arguments to the function: 
	var leftOffset = scrolledX + (centerX - Xwidth) / 2; 
	var topOffset = scrolledY + (centerY - Yheight) / 2; 
	// The initial width and height of the div can be set in the 
	// style sheet with display:none; divid is passed as an argument to // the function 
	var o=document.getElementById(divid); 
	var r=o.style; 
	r.position='absolute'; 
	r.top = topOffset + 'px'; 
	r.left = leftOffset + 'px'; 
	r.display = "block"; 
} 
