// JavaScript Document

var newWindow;

function displayMovie(imageName, iWidth, iHeight){
	if(!newWindow || newWindow.closed){
		newWindow = window.open("", "", "height="+iHeight+", width="+iWidth+"");
		
		var newContent = "<HTML><HEAD><TITLE>Movie</TITLE></HEAD>"
			newContent += "<BODY leftmargin=0 topmargin=0><table width='100%' height='100%' border='0' cellspacing='0' cellpadding='0'><tr><td align='center' valign='middle'>"
			newContent += "<OBJECT classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'"
			newContent += "codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0' WIDTH='100%' HEIGHT='100%'>"
			newContent += "<PARAM NAME=movie VALUE='"+imageName+"'><PARAM NAME=quality VALUE=high>"
			newContent += "<PARAM NAME=scale VALUE=exactfit> <PARAM NAME=salign VALUE=LT> <PARAM NAME=bgcolor VALUE=#FFFFFF>" 
			newContent += "<EMBED src='"+imageName+"' loop=false quality=high scale=exactfit salign=LT bgcolor=#FFFFFF  WIDTH=100% HEIGHT=100% TYPE='application/x-shockwave-flash' PLUGINSPAGE='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash'></EMBED>"
			newContent += "</OBJECT>"
			newContent += "</td></tr></table>"
			newContent += "</BODY></HTML>"
			newWindow.document.write(newContent);
			newWindow.document.close();
	}
	else{
		newWindow.close();
		newWindow = window.open("", "", "height="+iHeight+", width="+iWidth+"");
		var  newContent = "<HTML><HEAD><TITLE>Movie</TITLE></HEAD>"
			newContent += "<BODY leftmargin=0 topmargin=0><table width='100%' height='100%' border='0' cellspacing='0' cellpadding='0'><tr><td align='center' valign='middle'>"
			newContent += "<OBJECT classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'"
			newContent += "codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0' WIDTH='100%' HEIGHT='100%'>"
			newContent += "<PARAM NAME=movie VALUE='"+imageName+"'><PARAM NAME=quality VALUE=high>"
			newContent += "<PARAM NAME=scale VALUE=exactfit> <PARAM NAME=salign VALUE=LT> <PARAM NAME=bgcolor VALUE=#FFFFFF>" 
			newContent += "<EMBED src='"+imageName+"' loop=false quality=high scale=exactfit salign=LT bgcolor=#FFFFFF  WIDTH=100% HEIGHT=100% TYPE='application/x-shockwave-flash' PLUGINSPAGE='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash'></EMBED>"
			newContent += "</OBJECT>"
			newContent += "</td></tr></table>"
			newContent += "</BODY></HTML>"
			
			newWindow.document.write(newContent);
			newWindow.document.close();
			
			newWindow.focus();
	}
}
	
function displayImage(imageName, iWidth, iHeight){
	if(!newWindow || newWindow.closed){
		newWindow = window.open("", "", "height="+iHeight+", width="+iWidth+"");
		
		var newContent = "<HTML><HEAD><TITLE>Movie</TITLE></HEAD>"
			newContent += "<BODY leftmargin=0 topmargin=0><table width='100%' height='100%' border='0' cellspacing='0' cellpadding='0'><tr><td align='center' valign='middle'><img src=" + imageName + "></td></tr></table>"
			newContent += "</BODY></HTML>"
			newWindow.document.write(newContent);
			newWindow.document.close();
	}
	else{
		newWindow.close();
		newWindow = window.open("", "", "height="+iHeight+", width="+iWidth+"");
		var newContent = "<HTML><HEAD><TITLE>Movie</TITLE></HEAD>"
			newContent += "<BODY leftmargin=0 topmargin=0><img src=" + imageName + ">"
			newContent += "</BODY></HTML>"
			
			newWindow.document.write(newContent);
			newWindow.document.close();
			
			newWindow.focus();
	}
}

function displayFLV(imageName, iWidth, iHeight, iSource){
	//alert ("This is a Javascript Alert")
	//
	if(!newWindow || newWindow.closed){
		newWindow = window.open("", "", "height="+iHeight+", width="+iWidth+",resizable=yes,scrollbars=yes");
		
		var newContent = "<HTML><HEAD><TITLE>Movie</TITLE></HEAD>"
			newContent += "<BODY bgcolor='#000000' leftmargin=0 topmargin=0 marginwidth=0 marginheight=0><table width='100%' height='100%' border='0' cellspacing='0' cellpadding='0'><tr><td align='center' valign='middle'>"
			newContent += "<OBJECT classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'"
			newContent += "codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' WIDTH='100%' HEIGHT='100%'>"
			newContent += "<PARAM NAME=movie VALUE='"+imageName+"'><PARAM NAME=quality VALUE=high>"
			newContent += "<PARAM NAME=scale VALUE='showall'> <PARAM NAME=salign VALUE=LT> <PARAM NAME=bgcolor VALUE=#FFFFFF>" 
			newContent += "<param name='FlashVars' value='flvSrc=movies/"+iSource+"' />"
			newContent += "<EMBED src='"+imageName+"' loop=false quality=high scale='showall' salign=LT bgcolor=#FFFFFF  WIDTH=100% HEIGHT=100% TYPE='application/x-shockwave-flash' FlashVars='flvSrc=movies/"+iSource+"' PLUGINSPAGE='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash'></EMBED>"
			newContent += "</OBJECT>"
			newContent += "</td></tr></table>"
			newContent += "</BODY></HTML>"
			newWindow.document.write(newContent);
			newWindow.document.close();
	}
	else{
		newWindow.close();
		newWindow = window.open("", "", "height="+iHeight+", width="+iWidth+",resizable=yes,scrollbars=yes");
		var newContent = "<HTML><HEAD><TITLE>Movie</TITLE></HEAD>"
			newContent += "<BODY  bgcolor='#000000' leftmargin=0 topmargin=0 marginwidth=0 marginheight=0><table width='100%' height='100%' border='0' cellspacing='0' cellpadding='0'><tr><td align='center' valign='middle'>"
			newContent += "<OBJECT classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'"
			newContent += "codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' WIDTH='100%' HEIGHT='100%'>"
			newContent += "<PARAM NAME=movie VALUE='"+imageName+"'><PARAM NAME=quality VALUE=high>"
			newContent += "<PARAM NAME=scale VALUE='showall'> <PARAM NAME=salign VALUE=LT> <PARAM NAME=bgcolor VALUE=#FFFFFF>" 
			newContent += "<param name='FlashVars' value='flvSrc=movies/"+iSource+"' />"
			newContent += "<EMBED src='"+imageName+"' loop=false quality=high scale='showall' salign=LT bgcolor=#FFFFFF  WIDTH=100% HEIGHT=100% TYPE='application/x-shockwave-flash' FlashVars='flvSrc=movies/"+iSource+"' PLUGINSPAGE='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash'></EMBED>"
			newContent += "</OBJECT>"
			newContent += "</td></tr></table>"
			newContent += "</BODY></HTML>"
			newWindow.document.write(newContent);
			newWindow.document.close();
			
			newWindow.focus();
	}//
	
}
var newwindow;
window.name = "main";
function poptastic(url,wWidth,wHeight)
{
	newwindow=window.open(url,'name','resizable=yes,width='+wWidth+',height='+wHeight+',scrollbars=yes');
	if (window.focus) {newwindow.focus()}
}

function Set_Cookie( name, value, expires, path, domain, secure ) 
{
// set time, it's in milliseconds
var today = new Date();
today.setTime( today.getTime() );

/*
if the expires variable is set, make the correct 
expires time, the current script below will set 
it for x number of days, to make it for hours, 
delete * 24, for minutes, delete * 60 * 24
*/
if ( expires )
{
expires = expires * 1000 * 60 * 60 * 24;
}
var expires_date = new Date( today.getTime() + (expires) );

document.cookie = name + "=" +escape( value ) +
( ( expires ) ? ";expires=" + expires_date.toGMTString() : "" ) + 
( ( path ) ? ";path=" + path : "" ) + 
( ( domain ) ? ";domain=" + domain : "" ) +
( ( secure ) ? ";secure" : "" );
}
	



