function getimageinfo(show,currentimage)
{
	var label = currentimage.substring(0,currentimage.lastIndexOf(".")); 
	if (label.indexOf("/") > 0) {
		label = label.substring(label.lastIndexOf("/")+1);
	}
	if (show == "1")	{
		page = "imageinfo/"+label+".html";
		openwin = window.open(page,"","width=450,height=500,scrollbars=1,resizable=0,toolbar=0,location=0,status=0,menubar=0");
	}
}
function jstrigger(currentimage)
{
	getimageinfo(1,currentimage);
}

function fullscreen() {
	
	var isWin=(navigator.appVersion.indexOf("Win")!=-1)? true : false;
	var isIE=(navigator.appVersion.indexOf("MSIE")!=-1)? true : false;
	var notIE7 = (navigator.appVersion.indexOf("MSIE 7.0")!=-1)? false : true;

	if(isWin&&isIE&&notIE7){
		var fullwindow = window.open("default.html",'26images.com',"fullscreen=1, scrollbars=0");
		fullwindow.focus();
	}else{
// 	for non-ie browsers, specify width and height instead of using fullscreen 
		var fullwindow = window.open("default.html","26images.com","width="+screen.availWidth+",height="+screen.availHeight);
		fullwindow.moveTo(0,0);
		fullwindow.focus();
	}	
}


function SDTF(state)
{
     var   flashMovie=getFlashMovieObject("xmlphotogallery");
     flashMovie.SetVariable("mousestate", state);
}

function SDTF26(state)
{
     var   flashMovie=getFlashMovieObject("26imagesflash");
     flashMovie.SetVariable("mousestate", state);
}


function getFlashMovieObject(movieName)
{
  if (window.document[movieName]) 
  {
      return window.document[movieName];
  }
  if (navigator.appName.indexOf("Microsoft Internet")==-1)
  {
    if (document.embeds && document.embeds[movieName])
     	 return document.embeds[movieName]; 
 }
  else // if (navigator.appName.indexOf("Microsoft Internet")!=-1)
  {
    return document.getElementById(movieName);
  }
}


function embedfotoplayer(fpfilename,fpwidth,fpheight,flashbgcolor,configxml,defaultalbum) {
	var fotoplayer_width= 0, fotoplayer_height= 0;
	fotoplayer_width= fpwidth;fotoplayer_height= fpheight;
	var querystring = window.location.search; 
	var querystringValue = querystring.substring(querystring.indexOf("=") +1, querystring.length); 
	if (querystringValue == "") {
		querystringValue = defaultalbum +"/";
	} 


	var MM_contentVersion = 7;
	var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
	if ( plugin ) {
			var words = navigator.plugins["Shockwave Flash"].description.split(" ");
		    for (var i = 0; i < words.length; ++i)
		    {
			if (isNaN(parseInt(words[i])))
			continue;
			var MM_PluginVersion = words[i]; 
		    }
		var MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;
	}
	else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 
	   && (navigator.appVersion.indexOf("Win") != -1)) {
		MM_FlashCanPlay = CheckFlash(MM_contentVersion);
	}
	if ( MM_FlashCanPlay ) {
		document.write(' <OBJECT classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"');
		document.write(' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" ');
		document.write(' ID="xmlphotogallery" WIDTH="'+fotoplayer_width+'" HEIGHT="'+fotoplayer_height+'" ALIGN="middle" onMouseOut="SDTF(0)" onMouseOver="SDTF(1)">');
		document.write(' <PARAM NAME=movie VALUE="/fp/res/'+fpfilename+'"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE='+flashbgcolor+'>');
		document.write(' <PARAM NAME=FlashVars VALUE="configpath=' + configxml + '&openfolder='+querystringValue+'">');
		document.write(' <EMBED src="/fp/res/'+fpfilename+'" bgcolor='+flashbgcolor+' quality="high" ');
		document.write(' swLiveConnect=TRUE WIDTH="'+fotoplayer_width+'" HEIGHT="'+fotoplayer_height+'" NAME="xmlphotogallery" ALIGN="middle" onMouseOut="SDTF(0)" onMouseOver="SDTF(1)"  ');
		document.write(' FlashVars="configpath=' + configxml + '&openfolder='+querystringValue+ '"');
		document.write(' TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">');
		document.write(' </EMBED>');
		document.write(' </OBJECT>');
	} else{
		document.write('<a href="http://www.macromedia.com/go/getflashplayer"><IMG SRC="/fp/res/fpnoflash.gif" WIDTH="640" HEIGHT="580"  BORDER=0></a>');
	}
	document.write('<NOSCR' + 'IPT><IMG SRC="/fp/res/fpnojavascript.gif" WIDTH="640" HEIGHT="580" BORDER=0><br>FotoPlayer</NOSCR' + 'IPT>');
}




function embed26flash(flashfilename,unit,fpwidth,fpheight,flashbgcolor) {
	var flash_width= 0, flash_height= 0;
	if (unit == "pixels") {
		flash_width= fpwidth;flash_height= fpheight;
	}
	else {
		flash_width= fpwidth+"%"; flash_height= fpheight+"%";
	}
	var querystring = window.location.search; 
	var querystringValue = querystring.substring(querystring.indexOf("=") +1, querystring.length); 
	var MM_contentVersion = 7;
	var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
	if ( plugin ) {
			var words = navigator.plugins["Shockwave Flash"].description.split(" ");
		    for (var i = 0; i < words.length; ++i)
		    {
			if (isNaN(parseInt(words[i])))
			continue;
			var MM_PluginVersion = words[i]; 
		    }
		var MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;
	}
	else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 
	   && (navigator.appVersion.indexOf("Win") != -1)) {
		MM_FlashCanPlay = CheckFlash(MM_contentVersion);
	}
	if ( MM_FlashCanPlay ) {
		document.write(' <OBJECT classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"');
		document.write(' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" ');
		document.write(' ID="26imagesflash" WIDTH="'+flash_width+'" HEIGHT="'+flash_height+'" ALIGN="middle" onMouseOut="SDTF26(0)" onMouseOver="SDTF26(1)">');
		document.write(' <PARAM NAME=movie VALUE="res/'+flashfilename+'"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE='+flashbgcolor+'>');
		document.write(' <EMBED src="res/'+flashfilename+'" bgcolor='+flashbgcolor+' quality="high" ');
		document.write(' swLiveConnect=TRUE WIDTH="'+flash_width+'" HEIGHT="'+flash_height+'" NAME="26imagesflash" ALIGN="middle" onMouseOut="SDTF(0)" onMouseOver="SDTF(1)"  ');
		document.write(' TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">');
		document.write(' </EMBED>');
		document.write(' </OBJECT>');
	} else{
		document.write('<a href="http://www.macromedia.com/go/getflashplayer">Get Flash player</a>');
	}
	document.write('<NOSCR' + 'IPT>No JavaScript</NOSCR' + 'IPT>');
}




function MM_openBrWindow(theURL,winName,features) { //v2.0 
   window.open(theURL,winName,features); 
} 

function printpage() {
	window.print();  
}

function openNewWindow(URLtoOpen, windowName, windowFeatures) 
{
	newWindow=window.open(URLtoOpen, windowName, windowFeatures); 
}

function openNewWindowToPrint(URLtoOpen, windowName, windowFeatures) 
{
	newWindow=window.open(URLtoOpen, windowName, windowFeatures); 
	newWindow.print();
}