//Highlight image script- By Dynamic Drive
//For full source code and more DHTML scripts, visit http://www.dynamicdrive.com
//This credit MUST stay intact for use

function makevisible1(cur,which){
var cur = photo_gallery;
strength=(which==0)? 1 : 0.2

if (cur.style.MozOpacity)
cur.style.MozOpacity=strength
else if (cur.filters)
cur.filters.alpha.opacity=strength*100
}

var persistclose=0 
var persistcloseship=0//set to 0 or 1. 1 means once the bar is manually closed, it will remain closed for browser session

var resol= 845;

/* alert("ScreenWidth" + screen.width); */

if(screen.width==1280){
	resol=900;
	}else if(screen.width==1024){
			resol=60;
		}else if(screen.width==800){
			resol=46;
		}

var startX = 60; //set x offset of bar in pixels
var startY = 240 //set y offset of bar in pixels
var verticalpos="fromtop" //enter "fromtop" or "frombottom"

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

function staticbar(){

	barheight= 380;
	var ns = (navigator.appName.indexOf("Netscape") != -1) || window.opera;
	var d = document;
	function ml(id){
		var el=d.getElementById(id);
		if (!persistclose || persistclose && getCookie("remainclosed")=="")
		el.style.visibility="visible"
		if(d.layers)el.style=el;
		el.sP=function(x,y){this.style.left=x+"px";this.style.top=y+"px";};
		el.x = startX;
		if (verticalpos=="fromtop")
		el.y = startY;
		else{
		el.y = ns ? pageYOffset + innerHeight : iecompattest().scrollTop + iecompattest().clientHeight;
		el.y -= startY;
		}
		return el;
	}
	window.stayTopLeft=function(){
		if (verticalpos=="fromtop"){
		var pY = ns ? pageYOffset : iecompattest().scrollTop;
		ftlObj.y += (pY + startY - ftlObj.y)/8;
		}
		else{
		var pY = ns ? pageYOffset + innerHeight - barheight: iecompattest().scrollTop + iecompattest().clientHeight - barheight;
		ftlObj.y += (pY - startY - ftlObj.y)/8;
		}
		ftlObj.sP(ftlObj.x, ftlObj.y);
		//alert(document.getElementById('topbar').style.top)
		if(parseInt(document.getElementById('topbar').style.top)<1220){
			document.getElementById('topbar').style.top = "1240px";
			//alert("yes");
			}
		setTimeout("stayTopLeft()", 10);	
		// 	alert(document.getElementById('topbar').style.top)
	}
	ftlObj = ml("topbar");
	stayTopLeft();
	
}

function showGallery(){
var winl = (screen.width-730)/2;
var wint = (screen.height-240)/2;	
var slen = document.getElementsByTagName("select").length;
var sname = "select";



for(i=0;i<slen-1;i++){


sname = sname + i;
if(slen==2){
}else{
document.getElementById(sname).style.visibility='hidden';
sname = "select";
alert(select);
}
}


if (window.addEventListener)
//alert(document.getElementById('topbar').style.top)
document.getElementById('topbar').style.visibility='visible';
document.getElementById('topbar').style.display='block';
document.getElementById('topbar').style.top =  ((document.body.scrollTop) + 165) + "px";
staticbar();
}
