
var baseopacity=80

function slowhigh(which2){
imgobj=which2
browserdetect=which2.filters? "ie" : typeof which2.style.MozOpacity=="string"? "mozilla" : ""
instantset(baseopacity)
highlighting=setInterval("gradualfade(imgobj)",60)
}

function slowlow(which2){
cleartimer()
instantset(baseopacity)
}

function instantset(degree){
if (browserdetect=="mozilla")
imgobj.style.MozOpacity=degree/50
else if (browserdetect=="ie")
imgobj.filters.alpha.opacity=degree
}

function cleartimer(){
if (window.highlighting) clearInterval(highlighting)
}

function gradualfade(cur2){
if (browserdetect=="mozilla" && cur2.style.MozOpacity<1)
cur2.style.MozOpacity=Math.min(parseFloat(cur2.style.MozOpacity)+0.1, 0.99)
else if (browserdetect=="ie" && cur2.filters.alpha.opacity<100)
cur2.filters.alpha.opacity+=10
else if (window.highlighting)
clearInterval(highlighting)
}


function openscreen1(img) {
		xposition=20; yposition=20;
		width=600
		height=575
		if ((parseInt(navigator.appVersion) >= 4 )){
			xposition = (screen.width - width) / 2;
			yposition = (screen.height - height) / 2;
		} 
		
		args = "width=" + width + "," 
			    + "height=" + height + "," 
				+ "location=0," 
				+ "menubar=0,"
				+ "resizable=0,"
				+ "scrollbars=no,"
				+ "status=0," 
				+ "titlebar=0,"
				+ "toolbar=0,"
				+ "hotkeys=0,"
				+ "screenx=" + xposition + ","  //NN Only
				+ "screeny=" + yposition + ","  //NN Only
				+ "left=" + xposition + ","     //IE Only
				+ "top=" + yposition;           //IE Only 
		ww = window.open('viewimage.php?img='+img, 'image_window', args);
	}




	function openscreen(img) {
		xposition=20; yposition=20;
		width=500
		height=375
		if ((parseInt(navigator.appVersion) >= 4 )){
			xposition = (screen.width - width) / 2;
			yposition = (screen.height - height) / 2;
		} 
		
		args = "width=" + width + "," 
			    + "height=" + height + "," 
				+ "location=0," 
				+ "menubar=0,"
				+ "resizable=0,"
				+ "scrollbars=no,"
				+ "status=0," 
				+ "titlebar=0,"
				+ "toolbar=0,"
				+ "hotkeys=0,"
				+ "screenx=" + xposition + ","  //NN Only
				+ "screeny=" + yposition + ","  //NN Only
				+ "left=" + xposition + ","     //IE Only
				+ "top=" + yposition;           //IE Only 
		ww = window.open('index.php?popup=1&img='+img,'devlabc', args);
	}
	function openscreenid( id, width, height ) {
		xposition=20; yposition=20;
		if ((parseInt(navigator.appVersion) >= 4 )){
			xposition = (screen.width - width) / 2;
			yposition = (screen.height - height) / 2;
		} 
		
		args = "width=" + width + "," 
			    + "height=" + height + "," 
				+ "location=0," 
				+ "menubar=0,"
				+ "resizable=0,"
				+ "scrollbars=no,"
				+ "status=0," 
				+ "titlebar=0,"
				+ "toolbar=0,"
				+ "hotkeys=0,"
				+ "screenx=" + xposition + ","  //NN Only
				+ "screeny=" + yposition + ","  //NN Only
				+ "left=" + xposition + ","     //IE Only
				+ "top=" + yposition;           //IE Only 
		ww = window.open('index.php?popup=1&item_id='+id,'devlabc', args);
	}
	function openPopup( url, width, height ) {
		xposition=20; yposition=20;
		if ((parseInt(navigator.appVersion) >= 4 )){
			xposition = (screen.width - width) / 2;
			yposition = (screen.height - height) / 2;
		} 
		args = "width=" + width + "," 
			    + "height=" + height + "," 
				+ "location=0," 
				+ "menubar=0,"
				+ "resizable=0,"
				+ "scrollbars=yes,"
				+ "status=0," 
				+ "titlebar=0,"
				+ "toolbar=0,"
				+ "hotkeys=0,"
				+ "screenx=" + xposition + ","  //NN Only
				+ "screeny=" + yposition + ","  //NN Only
				+ "left=" + xposition + ","     //IE Only
				+ "top=" + yposition;           //IE Only 
		ww = window.open(url,'devlabc', args);
	}
	
var menus = new Array();

function showMenu(id) {
	menus[id] = false;
	document.getElementById(id).style.display = 'block';
}

function hide (id) {
	if (menus[id])
	{
		document.getElementById(id).style.display = 'none';
	}
}
function hideMenu(id) {
	menus[id] = true;
	hide(id);
}

