// sets layer z-index

function setHidden(id) {
/*	document.getElementById(id).style.zIndex = z_index;*/
	document.getElementById(id).style.visibility = "hidden";
}
function setHiddenAll() {
/*	document.getElementById(id).style.zIndex = z_index;*/
	for (i=1;i<=numberOfProductDIVs;i++) {
			document.getElementById("IDTABLE"+i).style.visibility = "hidden";
	}
}
function setVisible(id) {
/*	document.getElementById(id).style.zIndex = z_index;*/
	document.getElementById(id).style.visibility = "visible";
}	
function setAlpha(id,Transparent) {
/*	document.getElementById(id).style.zIndex = z_index;*/
	document.getElementById(id).style.filter='alpha(opacity='+Transparent+')';
	document.getElementById(id).style['MozOpacity'] = Transparent/100; 
	document.getElementById(id).style['KhtmlOpacity'] = Transparent/100; 
	document.getElementById(id).style['opacity'] = Transparent/100; 
}	
function setZIndex(id, z_index) {
	document.getElementById(id).style.zIndex = z_index;
}

function openwindow(windowId,moduleName,widthIn,heightIn,windowType) {
/* Window - numeric */
/* windowType=X (No Resizing) or Y (possible to Resize) or other */

if (widthIn == null) {
 widthIn = "500";
}
if (heightIn == null) {
 heightIn = "500";
}

if (windowType == null) {
 windowType = "N";
}

if (!(windowType == "Y" || windowType == "N" || windowType == "S")) {
 windowType = "X";
}

	this.moduleLocation = moduleName;
	this.windowName = "sharksProduct" + windowId;
	windowRef = "newwindow" + windowId;
	i = windowId;
	windowopen[i]=true;

	if (windowType == "N" ) {
		windowParameter = "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width="+widthIn+",height="+heightIn
	}
	else {
		if (windowType == "X" ) {
			windowParameter = "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width="+widthIn+",height="+heightIn
		}
		else {
			if (windowType == "S" ) {
				windowParameter = "toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width="+widthIn+",height="+heightIn
			}
			else {
				windowParameter = "toolbar=yes,location=yes,directories=no,status=no,menubar=yes,scrollbars=yes,resizable=yes,copyhistory=no,width="+widthIn+",height="+heightIn
			}
		}
	}
	windowType == "";
	newwindow[i] = window.open(moduleLocation, windowName, windowParameter );
	if (window.focus) 
	{
		newwindow[i].focus()
	}
}

function openblank(windowId,moduleName,widthIn,heightIn) {
  openwindow(windowId,moduleName,widthIn,heightIn,"Y");
}

function closewindow() /* For Clothing Page */
{
	for (i=20;i<31;i++) {
		if (windowopen[i]) {
			newwindow[i].close(); 
			windowopen[i]=false;
		}
	}
}

/* 
 The following functions allow any needed changes in window dimension in this one place.
*/
function openwindowAddress() {
  openwindow(60,"SnailMail.html",350,500);
}

