/*************************FADINF IMAGE ROLLOVERS*********************************/
/****** User may alter these to change the fade effect ********/
var FadeInStep 	= 10;
var FadeOutStep 	= 7;
/****** Don't alter anything else **************/
document.write('<STYLE TYPE="text/css">.imgFader{ position:relative; filter:alpha(opacity=0); -moz-opacity:0.0 }</STYLE>');

if(!window.JSFX)
	JSFX=new Object();

JSFX.RolloverObjects=new Array();

JSFX.Rollover = function(name, img)
{
	JSFX.RolloverObjects[name]=new Image();
	JSFX.RolloverObjects[name].img_src = img;	
	if(!JSFX.Rollover.postLoad)
		JSFX.RolloverObjects[name].src = img;
}
JSFX.Rollover.postLoad = false;
JSFX.Rollover.loadImages = function()
{
	var i;
	for(i in JSFX.RolloverObjects)
	{
		r=JSFX.RolloverObjects[i];
		r.src=r.img_src;
	}
}
JSFX.Rollover.error = function(n)
{
		alert("JSFX.Rollover - An Error has been detected\n"
			+ "----------------------------------\n"
			+ "You must define a JSFX.Rollover in your document\n"
			+ "JSFX.Rollover(\""+n+"\",\"your_on_img.gif\")\n"
			+ "(check the spelling of your JSFX.Rollovers)");
}
/*******************************************************************
*
* Function    : getImg
*
* Description : In Netscape 4 images could be in layers so we might
*		    have to recurse the layers to find the image
*
*****************************************************************/
JSFX.getImg = function(n, d) 
{
	var img = d.images[n];
	if(!img && d.layers)  
		for(var i=0 ; !img && i<d.layers.length ; i++)
			img=JSFX.getImg(n,d.layers[i].document);
	return img;
}
/*******************************************************************
*
* Function    : findImg
*
* Description : gets the image from the document and reports an
*		    error if it cannot find it.
*
*****************************************************************/
JSFX.findImg = function(n, d) 
{
	var img = JSFX.getImg(n, d);

	/*** Stop emails because the image was named incorrectly ***/
	if(!img)
	{
		alert("JSFX.findImg - An Error has been detected\n"
			+ "----------------------------------\n"
			+ "You must define an image in your document\n"
			+ "<IMG SRC=\"your_image.ext\" NAME=\""+n+"\">\n"
			+ "(check the NAME= attribute of your images)");

		return(new Image());
	}
	return img;
}

JSFX.ImageFadeRunning=false;
JSFX.ImageFadeInterval=30;

/*******************************************************************
*
* Function    : imgFadeIn
*
* Description : This function is based on the turn_on() function
*		      of animate2.js (animated rollovers from www.roy.whittle.com).
*		      Each image object is given a state. 
*			OnMouseOver the state is switched depending on the current state.
*			Current state -> Switch to
*			===========================
*			null		->	OFF.
*			OFF		->	FADE_IN
*			FADE_OUT	->	FADE_IN
*			FADE_OUT	->	FADE_OUT_IN (if the new image is different)
*			FADE_IN_OUT->	FADE_IN (if the image is the same)
*****************************************************************/
JSFX.imgFadeIn = function(img, imgSrc)
{
	if(img) 
	{
		if(img.state == null) 
		{
			img.state = "OFF";
			img.index = 0;
			img.next_on    = null;
		}

		if(img.state == "OFF")
		{
			/*** Vers 1.7 only load the ON image once ever ***/
			if(img.src.indexOf(imgSrc) == -1)
				img.src=imgSrc;

			img.currSrc = imgSrc;
			img.state = "FADE_IN";
			JSFX.startFading();
		}
		else if( img.state == "FADE_IN_OUT"
			|| img.state == "FADE_OUT_IN"
			|| img.state == "FADE_OUT")
		{
			if(img.currSrc == imgSrc)
				img.state = "FADE_IN";
			else
			{

				img.next_on = imgSrc;
				img.state="FADE_OUT_IN";
			}
		}
	}
}
/*******************************************************************
*
* Function    : imgFadeOut
*
* Description : This function is based on the turn_off function
*		      of animate2.js (animated rollovers from www.roy.whittle.com).
*		      Each image object is given a state. 
*			OnMouseOut the state is switched depending on the current state.
*			Current state -> Switch to
*			===========================
*			ON		->	FADE_OUT.
*			FADE_IN	->	FADE_IN_OUT.
*			FADE_OUT_IN	->	FADE_IN. (after swapping to the next image)
*****************************************************************/
JSFX.imgFadeOut = function(img)
{
	if(img)
	{
		if(img.state=="ON")
		{
			img.state="FADE_OUT";
			JSFX.startFading();
		}
		else if(img.state == "FADE_IN")
		{
			img.state="FADE_IN_OUT";
		}
		else if(img.state=="FADE_OUT_IN")
		{
			img.next_on == null;
			img.state = "FADE_OUT";
		}
	}
}
/*******************************************************************
*
* Function    : startFading
*
* Description : This function is based on the start_animating() function
*	        	of animate2.js (animated rollovers from www.roy.whittle.com).
*			If the timer is not currently running, it is started.
*			Only 1 timer is used for all objects
*****************************************************************/
JSFX.startFading = function()
{
	if(!JSFX.ImageFadeRunning)
		JSFX.ImageFadeAnimation();
}

/*******************************************************************
*
* Function    : ImageFadeAnimation
*
* Description : This function is based on the Animate function
*		    of animate2.js (animated rollovers from www.roy.whittle.com).
*		    Each image object has a state. This function
*		    modifies each object and (possibly) changes its state.
*****************************************************************/
JSFX.ImageFadeAnimation = function()
{
	JSFX.ImageFadeRunning = false;
	for(i=0 ; i<document.images.length ; i++)
	{
		var img = document.images[i];
		if(img.state)
		{
			if(img.state == "FADE_IN")
			{
				img.index+=FadeInStep;

				if(img.index > 100)
					img.index = 100;

				if(img.filters)
					img.filters.alpha.opacity = img.index;
				else
					img.style.MozOpacity = img.index/101;

				if(img.index == 100)
					img.state="ON";
				else
					JSFX.ImageFadeRunning = true;
			}
			else if(img.state == "FADE_IN_OUT")
			{
				img.index+=FadeInStep;
				if(img.index > 100)
					img.index = 100;

				if(img.filters)
					img.filters.alpha.opacity = img.index;
				else 
					img.style.MozOpacity = img.index/101;

	
				if(img.index == 100)
					img.state="FADE_OUT";

				JSFX.ImageFadeRunning = true;
			}
			else if(img.state == "FADE_OUT")
			{
				img.index-=FadeOutStep;
				if(img.index < 0)
					img.index = 0;

				if(img.filters)
					img.filters.alpha.opacity = img.index;
				else
					img.style.MozOpacity = img.index/101;


				if(img.index == 0)
					img.state="OFF";
				else
					JSFX.ImageFadeRunning = true;
			}
			else if(img.state == "FADE_OUT_IN")
			{
				img.index-=FadeOutStep;
				if(img.index < 0)
					img.index = 0;

				if(img.filters)
					img.filters.alpha.opacity = img.index;
				else
					img.style.MozOpacity = img.index/101;

				if(img.index == 0)
				{
					img.src = img.next_on;
					img.currSrc = img.next_on;
					img.state="FADE_IN";
				}
				JSFX.ImageFadeRunning = true;
			}
		}
	}
	/*** Check to see if we need to animate any more frames. ***/
	if(JSFX.ImageFadeRunning)
		setTimeout("JSFX.ImageFadeAnimation()", JSFX.ImageFadeInterval);
}
/*******************************************************************
*
* Function    : hasOpacity
*
* Description : Tests if the browser allows Opacity
*
*****************************************************************/
JSFX.hasOpacity = function(obj)
{
	if(document.layers)
		return false;

	if(window.opera)
		return false;

	if(navigator.userAgent.toLowerCase().indexOf("mac") != -1)
		return false;

	return true;
}
/*******************************************************************
*
* Function    : fadeIn /fadeOut
*
* Description : Detects browser that can do opacity and fades the images
*		    For browsers that do not support opacity it just does an image swap.
*		    (I only know about NS4 but maybe IE on a Mac also ?)
*		    For these functions to work you need to name the image
*			e.g. for an image named "home" you need
*			<IMG .... NAME="home">
*		    and you need 2 images, the on and the off image
*****************************************************************/
JSFX.fadeIn = function(imgName, rollName)
{
	if(rollName == null)
		rollName=imgName;

	/*** Stop emails because the rollover was named incorrectly ***/
	if(!JSFX.RolloverObjects[rollName])
	{
		JSFX.Rollover.error(rollName);
		return;
	}

	var img = JSFX.findImg(imgName, document);
	if(JSFX.hasOpacity(img))
		JSFX.imgFadeIn(img, JSFX.RolloverObjects[rollName].img_src);
	else
	{
		if(img.offSrc==null)
			img.offSrc=img.src;
		img.src=JSFX.RolloverObjects[rollName].img_src;
	}
}
JSFX.fadeOut = function(imgName)
{
	var img = JSFX.findImg(imgName, document);
	if(JSFX.hasOpacity(img))
		JSFX.imgFadeOut(img);
	else
		img.src=img.offSrc;
}
/*******************************************************************
*
* Function    : imgOn /imgOff
*
* Description : Included these functions so you can mix simple and
*		    fading rollovers without having to include 2 ".js" files
*
*****************************************************************/
JSFX.imgOn = function(imgName, rollName)
{
	if(rollName == null)
		rollName=imgName;

	/*** Stop emails because the rollover was named incorrectly ***/
	if(!JSFX.RolloverObjects[rollName])
	{
		JSFX.Rollover.error(rollName);
		return;
	}
	var img = JSFX.findImg(imgName,document);
	if(img.offSrc==null)
		img.offSrc=img.src;
	img.src=JSFX.RolloverObjects[rollName].img_src;
}
JSFX.imgOff = function(imgName)
{
	var img = JSFX.findImg(imgName,document);
	img.src=img.offSrc;
}

/*******************Gradual-Highlight Image Script******************/

nereidFadeObjects = new Object();
nereidFadeTimers = new Object();

/* object - image to be faded (actual object, not name);
 * destop - destination transparency level (ie 80, for mostly solid)
 * rate   - time in milliseconds between trasparency changes (best under 100)
 * delta  - amount of change each time (ie 5, for 5% change in transparency)
 */

function nereidFade(object, destOp, rate, delta){
if (!document.all)
return
    if (object != "[object]"){  //do this so I can take a string too
        setTimeout("nereidFade("+object+","+destOp+","+rate+","+delta+")",0);
        return;
    }
        
    clearTimeout(nereidFadeTimers[object.sourceIndex]);
    
    diff = destOp-object.filters.alpha.opacity;
    direction = 1;
    if (object.filters.alpha.opacity > destOp){
        direction = -1;
    }
    delta=Math.min(direction*diff,delta);
    object.filters.alpha.opacity+=direction*delta;

    if (object.filters.alpha.opacity != destOp){
        nereidFadeObjects[object.sourceIndex]=object;
        nereidFadeTimers[object.sourceIndex]=setTimeout("nereidFade(nereidFadeObjects["+object.sourceIndex+"],"+destOp+","+rate+","+delta+")",rate);
    }
}


/***********************************************
* AnyLink Drop Down Menu- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

var menu1=new Array()
menu1[0]='<b>Last Spell, Last Arrow, Last Orc<b>'
menu1[1]='<a href="viewer.php?artist=samwise&cat=warcraft&art=1">View Artwork</a>'
menu1[2]='<a href="downloads/LastSpellArrowOrc.zip">Download Wallpaper</a>'

var menu2=new Array()
menu2[0]='<b>Gathering of Tribes<b>'
menu2[1]='<a href="viewer.php?artist=samwise&cat=warcraft&art=2">View Artwork</a>'
menu2[2]='<a href="downloads/GatheringOfTribes.zip">Download Wallpaper</a>'

var menu3=new Array()
menu3[0]='<b>Duel at Thunder Ridge<b>'
menu3[1]='<a href="viewer.php?artist=samwise&cat=warcraft&art=3">View Artwork</a>'
menu3[2]='<a href="downloads/DuelThunderRidge.zip">Download Wallpaper</a>'

var menu4=new Array()
menu4[0]='<b>Tauren it up!<b>'
menu4[1]='<a href="viewer.php?artist=samwise&cat=warcraft&art=59">View Artwork</a>'
menu4[2]='<a href="downloads/TaurenItUp.zip">Download Wallpaper</a>'

var menu5=new Array()
menu5[0]='<b>Welcome to Lordaeron<b>'
menu5[1]='<a href="viewer.php?artist=samwise&cat=warcraft&art=60">View Artwork</a>'
menu5[2]='<a href="downloads/WelcomeToLordaeron.zip">Download Wallpaper</a>'

var menu6=new Array()
menu6[0]='<b>Twilight of the Immortals<b>'
menu6[1]='<a href="viewer.php?artist=samwise&cat=warcraft&art=61">View Artwork</a>'
menu6[2]='<a href="downloads/TwilightImmortals.zip">Download Wallpaper</a>'

var menu7=new Array()
menu7[0]='<b>Welcome to Kalimdor<b>'
menu7[1]='<a href="viewer.php?artist=samwise&cat=warcraft&art=76">View Artwork</a>'
menu7[2]='<a href="downloads/WelcomeToKalimdor.zip">Download Wallpaper</a>'

var menu8=new Array()
menu8[0]='<b>Alliance vs. Horde<b>'
menu8[1]='<a href="viewer.php?artist=samwise&cat=warcraft&art=43">View Artwork</a>'
menu8[2]='<a href="downloads/AllianceHorde.zip">Download Wallpaper</a>'

var menu9=new Array()
menu9[0]='<b>Sentinels vs. Scourge<b>'
menu9[1]='<a href="viewer.php?artist=samwise&cat=warcraft&art=44">View Artwork</a>'
menu9[2]='<a href="downloads/SentinelsScourge.zip">Download Wallpaper</a>'

var menu10=new Array()
menu10[0]='<b>Pandaren Shodo Pan<b>'
menu10[1]='<a href="viewer.php?artist=samwise&cat=warcraft&art=27">View Artwork</a>'
menu10[2]='<a href="downloads/ShodoPan.zip">Download Wallpaper</a>'

var menu11=new Array()
menu11[0]='<b>Sons of the Storm<b>'
menu11[1]='<a href="downloads/SonsOfTheStorm.zip">Download Wallpaper</a>'

var menu12=new Array()
menu12[0]='<b>Dwarven Prospector<b>'
menu12[1]='<a href="viewer.php?artist=twincruiser&cat=warcraft&art=7">View Artwork</a>'
menu12[2]='<a href="downloads/DwarvenProspector.zip">Download Wallpaper</a>'

var menu13=new Array()
menu13[0]='<b>Scarlet Crusader<b>'
menu13[1]='<a href="viewer.php?artist=twincruiser&cat=warcraft&art=9">View Artwork</a>'
menu13[2]='<a href="downloads/ScarletCrusader.zip">Download Wallpaper</a>'

var menu14=new Array()
menu14[0]='<b>Defias Renegade<b>'
menu14[1]='<a href="viewer.php?artist=twincruiser&cat=warcraft&art=10">View Artwork</a>'
menu14[2]='<a href="downloads/DefiasRenegade.zip">Download Wallpaper</a>'

var menu15=new Array()
menu15[0]='<b>Dark Apothecary<b>'
menu15[1]='<a href="viewer.php?artist=twincruiser&cat=warcraft&art=8">View Artwork</a>'
menu15[2]='<a href="downloads/DarkApothecary.zip">Download Wallpaper</a>'

var menu16=new Array()
menu16[0]='<b>Human Marksman<b>'
menu16[1]='<a href="viewer.php?artist=samwise&cat=warcraft&art=5">View Artwork</a>'
menu16[2]='<a href="downloads/HumanMarksman.zip">Download Wallpaper</a>'

var menu17=new Array()
menu17[0]='<b>Epic Paladin<b>'
menu17[1]='<a href="viewer.php?artist=samwise&cat=warcraft&art=62">View Artwork</a>'
menu17[2]='<a href="downloads/EpicPaladin.zip">Download Wallpaper</a>'

var menu18=new Array()
menu18[0]='<b>Orc Necromancer<b>'
menu18[1]='<a href="viewer.php?artist=samwise&cat=warcraft&art=9">View Artwork</a>'
menu18[2]='<a href="downloads/OrcNecromancer.zip">Download Wallpaper</a>'

var menu19=new Array()
menu19[0]='<b>Dwarven Scout<b>'
menu19[1]='<a href="viewer.php?artist=samwise&cat=warcraft&art=4">View Artwork</a>'
menu19[2]='<a href="downloads/DwarvenScout.zip">Download Wallpaper</a>'

var menu20=new Array()
menu20[0]='<b>Cenarius<b>'
menu20[1]='<a href="viewer.php?artist=thammer&cat=warcraft&art=20">View Artwork</a>'
menu20[2]='<a href="downloads/Cenarius.zip">Download Wallpaper</a>'

var menu21=new Array()
menu21[0]='<b>Krasus<b>'
menu21[1]='<a href="viewer.php?artist=thammer&cat=warcraft&art=21">View Artwork</a>'
menu21[2]='<a href="downloads/Krasus.zip">Download Wallpaper</a>'

var menu22=new Array()
menu22[0]='<b>Medivh<b>'
menu22[1]='<a href="viewer.php?artist=thammer&cat=warcraft&art=22">View Artwork</a>'
menu22[2]='<a href="downloads/Medivh.zip">Download Wallpaper</a>'

var menu23=new Array()
menu23[0]='<b>Xavius<b>'
menu23[1]='<a href="viewer.php?artist=thammer&cat=warcraft&art=23">View Artwork</a>'
menu23[2]='<a href="downloads/Xavius.zip">Download Wallpaper</a>'

var menu24=new Array()
menu24[0]='<b>Thrall<b>'
menu24[1]='<a href="viewer.php?artist=metzen&cat=warcraft&art=40">View Artwork</a>'
menu24[2]='<a href="downloads/Thrall.zip">Download Wallpaper</a>'

var menu25=new Array()
menu25[0]='<b>Shandris Feathermoon<b>'
menu25[1]='<a href="viewer.php?artist=metzen&cat=warcraft&art=16">View Artwork</a>'
menu25[2]='<a href="downloads/Shandris.zip">Download Wallpaper</a>'

var menu26=new Array()
menu26[0]='<b>Brann Bronzebeard<b>'
menu26[1]='<a href="viewer.php?artist=metzen&cat=warcraft&art=2">View Artwork</a>'
menu26[2]='<a href="downloads/Brann.zip">Download Wallpaper</a>'
		
var menuwidth='95px' //default menu width
var menubgcolor=''  //menu bgcolor
var disappeardelay=250  //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick="no" //hide menu when user clicks within menu?

/////No further editting needed

var ie4=document.all
var ns6=document.getElementById&&!document.all

if (ie4||ns6)
document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()"  onMouseout="dynamichide(event)"></div>')

function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}


function showhide(obj, e, visible, hidden, menuwidth){
if (ie4||ns6)
dropmenuobj.style.left=dropmenuobj.style.top=-500
if (menuwidth!=""){
dropmenuobj.widthobj=dropmenuobj.style
dropmenuobj.widthobj.width=menuwidth
}
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
obj.visibility=visible
else if (e.type=="click")
obj.visibility=hidden
}

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function clearbrowseredge(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge"){
var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
}
else{
var topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffset
var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move up?
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either?
edgeoffset=dropmenuobj.y+obj.offsetHeight
}
}
return edgeoffset
}

function populatemenu(what){
if (ie4||ns6)
dropmenuobj.innerHTML=what.join("")
}


function dropdownmenu(obj, e, menucontents, menuwidth){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidemenu()
dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
populatemenu(menucontents)

if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)
dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
}

return clickreturnvalue()
}

function clickreturnvalue(){
if (ie4||ns6) return false
else return true
}

function contains_ns6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function dynamichide(e){
if (ie4&&!dropmenuobj.contains(e.toElement))
delayhidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhidemenu()
}

function hidemenu(e){
if (typeof dropmenuobj!="undefined"){
if (ie4||ns6)
dropmenuobj.style.visibility="hidden"
}
}

function delayhidemenu(){
if (ie4||ns6)
delayhide=setTimeout("hidemenu()",disappeardelay)
}

function clearhidemenu(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}

if (hidemenu_onclick=="yes")
document.onclick=hidemenu

/*******************************************************************
*
WINDOW POP UP
*
*****************************************************************/

var win = null;
function NewWindow(mypage,myname,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings =
'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
win = window.open(mypage,myname,settings)
}

/*******************************************************************
*
PopUpOmega
*
*****************************************************************/

function popUpOmega (screenshot, imgWidth, imgHeight, caption) {
	 frameWidth = imgWidth+0;
     frameHeight = imgHeight+0;	 
     if (!caption) caption = "";	
	 
	 width = imgWidth + 0;
     if ( width < 525 ) width = 525;
     height = imgHeight + 0;
     if ( screen.availWidth > width ) {
         moveX = (screen.availWidth-width)/2;
     } else {
         width = screen.availWidth;
         moveX = 0;
     }
     if ( screen.availHeight > height ) {
         moveY = (screen.availHeight-height)/3;
     } else {
         height = screen.availHeight;
         moveY = 0;
     }
	//Browser detection - is the user relying on the one browser where this script does not work?
	var is_safari = ((navigator.appName.indexOf('safari')!=-1)&&(navigator.appName.indexOf('mac')!=-1))?true:false;
	winFeatures = "width=" + frameWidth + ",height=" + frameHeight + ",left="+moveX+",top="+moveY+",menubar=no,resizable=no,scrollbars=no,statusbar=no,toolbar=no,locationbar=no"
	if (is_safari) spawn = window.open(screenshot,name,winFeatures);
	else
	{
		spawn = window.open("images/blank.gif","Screeni",winFeatures)
		spawn.document.write("<html><head><title>" + caption +"<\/title>\
		</head>\
		<body style='margin: 0; padding: 0;' onBlur='self.close()'>\
		<div id='wrapper' style='height: " + frameHeight + "px; width: " + frameWidth + "px;'><img src='" + screenshot + "'><\/div>\
		<\/body>\
		<\/html>");
		spawn.document.close();
	}
}

/*******************************************************************
*
Photo Phader
*
*****************************************************************/
function opacity(id, opacStart, opacEnd, millisec) { 
    //speed for each frame 
    var speed = Math.round(millisec / 150); 
    var timer = 0; 

    //determine the direction for the blending, if start and end are the same nothing happens 
    if(opacStart > opacEnd) { 
        for(i = opacStart; i >= opacEnd; i--) { 
            setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed)); 
            timer++; 
        } 
    } else if(opacStart < opacEnd) { 
        for(i = opacStart; i <= opacEnd; i++) 
            { 
            setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed)); 
            timer++; 
        } 
    } 
} 

//change the opacity for different browsers 
function changeOpac(opacity, id) { 
    var object = document.getElementById(id).style; 
    object.opacity = (opacity / 100); 
    object.MozOpacity = (opacity / 100); 
    object.KhtmlOpacity = (opacity / 100); 
    object.filter = "alpha(opacity=" + opacity + ")"; 
} 

function shiftOpacity(id, millisec) { 
    //if an element is invisible, make it visible, else make it ivisible 
    if(document.getElementById(id).style.opacity == 0) { 
        opacity(id, 0, 100, millisec); 
    } else { 
        opacity(id, 100, 0, millisec); 
    } 
}