// JavaScript Document



function showLayer(layer){

 try {

 document.getElementById(layer).style.display = "block";

 } catch(e){}

}

function showLayerDefault(layer){

 try {

 document.getElementById(layer).style.display = "";

 } catch(e){}

}

function hideLayer(layer){

 try {

 document.getElementById(layer).style.display = "none";

 } catch(e){}

}

function show_photo( pFileName, pTitle, pCaption) {

// specify window parameters

photoWin = window.open( "", "photo","width=800,height=600,status,scrollbars,resizable=no,screenX=10,screenY=10,left=10,top=10");

// wrote content to window

photoWin.document.write('<html><head><title>' + pTitle + '</title></head>'); photoWin.document.write('<BODY>');

photoWin.document.write('<font size=+2 face="Trebuchet MS,arial"><center><b>' + pCaption + '</b></center></font><br>');

photoWin.document.write('<p></p><center><img src="../bin/' + pFileName + '"></center>');

photoWin.document.write('</body></html>');

photoWin.document.close(); } 

function openWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


// With image cross fade effect for those browsers that support it.
// Script copyright (C) 2004 www.cryer.co.uk.
// Script is free to use provided this copyright header is included.
var slideCache = new Array();
function RunSlideShow(pictureName,imageFiles,displaySecs)
	{
		var imageSeparator = imageFiles.indexOf(";");
		var nextImage = imageFiles.substring(0,imageSeparator);
		if (document.all)
			{
				document.getElementById(pictureName).style.filter="blendTrans(duration=0)";
				document.getElementById(pictureName).filters.blendTrans.Apply();
			}
			document.getElementById(pictureName).src = nextImage;
			if (document.all)
				{
					document.getElementById(pictureName).filters.blendTrans.Play();
				}
			var futureImages= imageFiles.substring(imageSeparator+1,imageFiles.length) 
			  + ';' + nextImage;
			setTimeout("RunSlideShow('"+pictureName+"','"+futureImages+"',"+displaySecs+")", 
			  displaySecs*1000);
			// Cache the next image to improve performance.
			imageSeparator = futureImages.indexOf(";");
			nextImage = futureImages.substring(0,imageSeparator);
			if (slideCache[nextImage] == null) 
				{
					slideCache[nextImage] = new Image;
					slideCache[nextImage].src = nextImage;
				}
	}
	

function changeLink(url)
{
	document.getElementById('download-installer').href=url;

}

function getLink()
{
	return document.getElementById('download-installer').href;
}


//when a global variable is set, it's added to the window object
var flashLink='images/retina-444-wBA-noEq-resize20';
function changeFlash(url){
	flashLink = url;
	window.location.reload(true);
}

function getFlashLink(){
	return window.flashLink;
	
}

function popup(mylink, windowname)
{
if (! window.focus)return true;
var href;
if (typeof(mylink) == 'string')
   href=mylink;
else
   href=mylink.href;
window.open(href, windowname, 'width=640,height=400,scrollbars=yes');
return false;
}

function targetopener(mylink, closeme, closeonly)
{
if (! (window.focus && window.opener))return true;
window.opener.focus();
if (! closeonly)window.opener.location.href=mylink.href;
if (closeme)window.close();
return false;
}
