// JavaScript Documentvar localRoot = "";function popWindow( url, width, height, windowName ){    //get center coords    var left = (screen.width - width) / 2;    var top = (screen.height - height) / 2;    return window.open(url, windowName, 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=' + width + ',height=' + height + ',left=' + left + ',top=' + top);}function popPrintWin(url){    //get center coords     window.open(url, 'Caldwell Leslie', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=800,height=800,left=50,top=50');}function printPage(){	window.print(); }function popScrollingWindow(url, width, height, windowName){    //get center coords    var left = (screen.width - width) / 2;    var top = (screen.height - height) / 2;    return window.open(url, windowName, 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=' + width + ',height=' + height + ',left=' + left + ',top=' + top);}function popScrollingWindow2(url, width, height, windowName){    //get center coords    var left = (screen.width - width) / 2;    var top = (screen.height - height) / 2;    return window.open(url, windowName, 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=' + width + ',height=' + height + ',left=' + left + ',top=' + top);}function openWindow(url){    var rand = "_blank";     window.open(url,rand,"directories=no,location=no,menubar=no,scrollbars=yes,status=yes,toolbar=no,resizable=yes,width=800,height=800,left=50,top=50");}function downloadFile(theFile){    popWindow(localRoot + "download.html?theFile="+theFile, 400, 200, "downloadWindow");}var debugFlag=false;function debug(string){    if (debugFlag == true)	{		alert(string);	}}var flashDebugFlag=false;var flashDebugBuffer = "";var flashDebugWindow = "";function flashDebug(string){	flashDebugBuffer += string + "<br>";    if (flashDebugFlag == true)	{		if (flashDebugWindow == "")		{			flashDebugWindow = popScrollingWindow(localRoot + "flash_debug.html",800,500,"flashDebug");		}		setTimeout("writeToFlashDebugWindow()", 500);	}}function writeToFlashDebugWindow(){	try	{		flashDebugWindow.document.getElementById('textDisplay').innerHTML = flashDebugBuffer;	}	catch (e)	{		flashDebugWindow.document.layers['textDisplay'].document.open();		flashDebugWindow.document.layers['textDisplay'].document.write(flashDebugBuffer);		flashDebugWindow.document.layers['textDisplay'].document.close();	}}function track(trackString){    switch (trackString)    {    case "XXXXX":        debug(trackString);        break;    default:        debug(trackString);        _hbPageView(trackString, "");        break;    }}function goEntryForm(){	window.location.href =  "contest/index.php";	}function popClip(clip, player, size){    player = player.toUpperCase();    size = size.toLowerCase();    popWindow(localRoot + 'clips/clips.html?movie='+clip+'&size='+player+size, 648, 488, "trailer");}function popIcons(){    popWindow(localRoot + "aim/aim.html", 550, 560, "aim_icons");}function popWallpaper(number, size){	var dimensions = "";	switch (size)	{	case "small":		dimensions = "800x600";		break;	case "medium":		dimensions = "1024x768";		break;	case "large":		dimensions = "1280x1024";		break;	default:		dimensions = size;		break;	}	openWindow(localRoot + "wallpaper/wallpaper.html?wallpaper=wallpaper_"+number+"_"+dimensions+".jpg");}function popScreensaver(){	track("screensaver+download");	popWindow(localRoot + "screensaver.html", 550, 560, "screensaver");}