<!--
function switchFrameSet(width)
{
    var iwidth = width;
	if (top.framesOn == true) //turn it off
	{
		document.body.cols = "*, 0";
		top.framesOn = false;
	}
	else //turn it on
	{
		//alert("iwidth = " + iwidth);
		document.getElementById('fs2').cols = iwidth + ', *';
		top.framesOn = true;
	}
}

function SetFrameSet(width)
{
    var iwidth = width;
	if (top.framesOn == true) //turn it off
	{
		document.body.cols = "*, 0";
		top.framesOn = false;
	}
	else //turn it on
	{
		//alert("iwidth = " + iwidth);
		window.parent.document.getElementById('fs2').cols = (iwidth + 100) + ', *';
		top.framesOn = true;
	}
}

function ReSetFrameSet()
{
	if (top.framesOn == true) //turn it off
	{
		document.body.cols = "*, 0";
		top.framesOn = false;
	}
	else //turn it on
	{
		window.parent.document.getElementById('fs2').cols = (185) + ', *';
		top.framesOn = true;
	}
}

function getPosition() { 
    try{	
	    document.forms[0].hid.value=document.body.scrollTop; 
    } catch (e){}
}
function setPosition() { 
	document.body.scrollTop=document.forms[0].hid.value; } 

function changeCursor(style) {
    try{	
	    //alert("Hit changeCursor = " + style);
	    document.body.style.cursor=style;
    } catch (e){}
}

function menuOnclick(selectedId, mouseOvrClr) {
    //alert("W =" + window.name);
    //alert("WP =" + window.parent.name);
    //alert("WPP =" + window.parent.parent.name);
    //alert("WPPP =" + window.parent.parent.parent.name);
    //try{
    //    alert("WPPMainHeader =" + window.self.parent.parent.frames.MainHeader.name);
    //} catch (e){}
	for (nCntr = 0; nCntr < 20; nCntr++){
		try{
			if (nCntr == selectedId){
				window.parent.parent.parent.frames.MainHeader.document.getElementById(nCntr).style.setAttribute("color", mouseOvrClr);
				window.parent.parent.parent.frames.MainHeader.document.getElementById(nCntr).setAttribute("title", "Current Page");
			} else {
				window.self.parent.parent.parent.frames.MainHeader.document.getElementById(nCntr).style.setAttribute("color", 'white');
				window.self.parent.parent.parent.frames.MainHeader.document.getElementById(nCntr).setAttribute("title", "");
			    //if (e.description == "Object required") {
			    //    //alert("e = " + e.description);
			    //    self.onerror = function() {return true;}
			    //}
			}
		} catch (e){
    		//in a Dist frame
			try{
				if (nCntr == selectedId){
					window.self.parent.parent.frames.MainHeader.document.getElementById(nCntr).style.setAttribute("color", mouseOvrClr);
					window.self.parent.parent.frames.MainHeader.document.getElementById(nCntr).setAttribute("title", "Current Page");
				} else {
					window.self.parent.parent.frames.MainHeader.document.getElementById(nCntr).style.setAttribute("color", 'white');
					window.self.parent.parent.frames.MainHeader.document.getElementById(nCntr).setAttribute("title", "");
				}
		    } catch (e){
			    try{
				    if (nCntr == selectedId){
					    this.document.getElementById(nCntr).style.setAttribute("color", mouseOvrClr);
					    this.document.getElementById(nCntr).setAttribute("title", "Current Page");
				    } else {
					    this.document.getElementById(nCntr).style.setAttribute("color", 'white');
					    this.document.getElementById(nCntr).setAttribute("title", "");
				    }
		        } catch (e){}
		    }
		}
	}
}

function menuMouse(WhichWay, selectedId, mouseOvrClr){
	for (nCntr = 0; nCntr < 20; nCntr++){
		try{
			if (window.parent.parent.parent.frames.MainHeader.document.getElementById(nCntr).title == "Current Page" && WhichWay == "Out" ){
				window.parent.parent.parent.frames.MainHeader.document.getElementById(nCntr).style.setAttribute("color",  mouseOvrClr);
			} else  {
				if (WhichWay == "Out"){
					window.parent.parent.parent.frames.MainHeader.document.getElementById(nCntr).style.setAttribute("color", 'white');
				} else if (nCntr == selectedId){
				    window.parent.parent.parent.frames.MainHeader.document.getElementById(nCntr).style.setAttribute("color", mouseOvrClr);
				} else {
					window.parent.parent.parent.frames.MainHeader.document.getElementById(nCntr).style.setAttribute("color", 'white');
				}
			}
		} catch (e){
    		//in a Dist frame
    		try{
			    if (window.self.parent.parent.frames.MainHeader.document.getElementById(nCntr).title == "Current Page" && WhichWay == "Out" ){
				    window.self.parent.parent.frames.MainHeader.document.getElementById(nCntr).style.setAttribute("color",  mouseOvrClr);
			    } else  {
				    if (WhichWay == "Out"){
					    window.self.parent.parent.frames.MainHeader.document.getElementById(nCntr).style.setAttribute("color", 'white');
				    } else if (nCntr == selectedId){
					    window.self.parent.parent.frames.MainHeader.document.getElementById(nCntr).style.setAttribute("color", mouseOvrClr);
					} else {
						window.self.parent.parent.frames.MainHeader.document.getElementById(nCntr).style.setAttribute("color", 'white');
				    }
			    }
    		} catch (e){
    		    try{
			        if (this.document.getElementById(nCntr).title == "Current Page" && WhichWay == "Out" ){
				        this.document.getElementById(nCntr).style.setAttribute("color",  mouseOvrClr);
			        } else  {
				        if (WhichWay == "Out"){
					        this.document.getElementById(nCntr).style.setAttribute("color", 'white');
				        } else if (nCntr == selectedId){
					        this.document.getElementById(nCntr).style.setAttribute("color", mouseOvrClr);
					    } else {
						    this.document.getElementById(nCntr).style.setAttribute("color", 'white');
				        }
			        }
    		    } catch (e){}
    		}
		}
	}
}

function langOnclick(selectedId, mouseOvrClr, page) {
	//alert(selectedId);
	switch(selectedId){
		case 'en':
			selectedId = 100;
			break;
		case 'es':
			selectedId = 101;
			break;
		case 'it':
			selectedId = 102;
			break;
		case 'de':
			selectedId = 103;
			break;
		case 'fr':
			selectedId = 104;
			break;
	}
	for (nCntr = 100; nCntr < 105; nCntr++){
			try{
				if (nCntr == selectedId){
					window.parent.parent.parent.frames.MainHeader.document.getElementById(nCntr).style.setAttribute("color", mouseOvrClr);
					window.parent.parent.parent.frames.MainHeader.document.getElementById(nCntr).setAttribute("title", "Current");
					if(page != "" ){ //coming from log in or any other page
						//alert("Please click your browser 'Refresh' button to complete language change.");
						window.parent.frames.MainCenter.location.href = "/models.aspx";
					}
				} else {
					window.parent.parent.parent.frames.MainHeader.document.getElementById(nCntr).style.setAttribute("color", 'white');
					window.parent.parent.parent.frames.MainHeader.document.getElementById(nCntr).setAttribute("title", "");
				}
		} catch (e){}
	}
	
}

function langMouse(WhichWay, selectedId, mouseOvrClr){
	for (nCntr = 100; nCntr < 105; nCntr++){
		try{
			if (window.parent.parent.parent.frames.MainHeader.document.getElementById(nCntr).title == "Current" && WhichWay == "Out" ){
				window.parent.parent.parent.frames.MainHeader.document.getElementById(nCntr).style.setAttribute("color",  mouseOvrClr);
			} else  {
				if (WhichWay == "Out"){
					window.parent.parent.parent.frames.MainHeader.document.getElementById(nCntr).style.setAttribute("color", 'white');
				} else if (nCntr == selectedId){
					window.parent.parent.parent.frames.MainHeader.document.getElementById(nCntr).style.setAttribute("color", mouseOvrClr);
					} else {
						window.parent.parent.parent.frames.MainHeader.document.getElementById(nCntr).style.setAttribute("color", 'white');
				}
			}
		} catch (e){}
	}
}

var cardcount = 0;
				
function IncCardCount() {
	cardcount = cardcount + 1;
	//limits number of zooms an image can go
	if(cardcount > 5){
		cardcount = 5;
		alert("Zoom limit reached.");
	}
	window.parent.parent.parent.frames.MainHeader.document.forms[0].hdnCardCount.value = cardcount;
	return cardcount;
}

function DecCardCount() {
	cardcount = cardcount - 1;
	//limits number of zooms an image can go
	if(cardcount < -5){
		cardcount = -5;
		alert("Zoom limit reached.");
	}
	window.parent.parent.parent.frames.MainHeader.document.forms[0].hdnCardCount.value = cardcount;
	return cardcount;
}

function show(object, left, top, width, height) {
	//alert("1 show(object_and_coords) = " + object + ", " + left + ", " + top + ", " + width + ", " + height)
	if (document.layers) {
		/*
		var doc = 'document.';
		var vis = '.visibility';
		var left = '.left';
		var top = '.top';
		var width = '.width';
		var height = '.height';
		*/
		window.parent.frames.ImageMain.document.getElementById(object).setAttribute("left", left-2);
		window.parent.frames.ImageMain.document.getElementById(object).setAttribute("top", top-2);
		window.parent.frames.ImageMain.document.getElementById(object).setAttribute("width", width+4);
		window.parent.frames.ImageMain.document.getElementById(object).setAttribute("height", height+4);
		window.parent.frames.ImageMain.document.getElementById(object).setAttribute("visibility", 'visible');
	}
		
	if (document.all) {
		//alert("show(object_and_coords) = " + object + ", " + left + ", " + top + ", " + width + ", " + height);
		/*
		var doc = 'document.all.';
		var vis = '.style.visibility';
		var left = '.style.left';
		var top = '.style.top';
		var width = '.style.width';
		var height = '.style.height';
		*/
		if (object=='MagGlass') {
			window.parent.frames.ImageMain.document.images[0].style.setAttribute("left", left);
			window.parent.frames.ImageMain.document.images[0].style.setAttribute("top", top);
			window.parent.frames.ImageMain.document.images[1].style.setAttribute("width", window.parent.frames.ImageMain.document.images[2].width*2);
			window.parent.frames.ImageMain.document.images[0].style.setAttribute("visibility", 'visible');
			window.parent.frames.ImageMain.document.images[1].style.setAttribute("visibility", 'visible');
		}
		else {
			//alert("show(object_and_coords) = " + object + ", " + left + ", " + top + ", " + width + ", " + height);
			hideAll('HS');
			window.parent.frames.ImageMain.document.getElementById(object).style.setAttribute("left", left-2);
			window.parent.frames.ImageMain.document.getElementById(object).style.setAttribute("top", top-2);
			window.parent.frames.ImageMain.document.getElementById(object).style.setAttribute("width", width+4);
			window.parent.frames.ImageMain.document.getElementById(object).style.setAttribute("height", height+4);
			window.parent.frames.ImageMain.document.getElementById(object).style.setAttribute("visibility", 'visible');
			//alert(window.parent.frames.ImageMain.document.getElementById(object).style.getAttribute("height"));
		}
	}
}

/*
function hide(object) {
	//alert("hide(object)")
	if (document.layers) {
		window.parent.frames.ImageMain.document.HotSpot.setAttribute("visibility", 'hidden');
	}
	else if (document.all){
		window.parent.frames.ImageMain.document.all.HotSpot.style.setAttribute("visibility", 'hidden');
	}
}
*/

function hideAll(what) {
	//alert("hideAll, what = " + what);
	switch (what) {
		case 'HS':
			for (nCtr = 0 ; nCtr < window.parent.frames.ImageMain.document.links.length ; nCtr++) {
				window.parent.frames.ImageMain.document.getElementById('HotSpot'+nCtr).style.setAttribute("visibility", 'hidden');
			}
			break;
		case 'MagGlass':
			window.parent.frames.ImageMain.document.images[0].style.setAttribute("visibility", 'hidden');
			window.parent.frames.ImageMain.document.images[1].style.setAttribute("visibility", 'hidden');

			window.parent.frames.ImageMain.document.images[0].style.setAttribute("left", 0);
			window.parent.frames.ImageMain.document.images[0].style.setAttribute("top", 0);
			window.parent.frames.ImageMain.document.images[1].style.setAttribute("left", 0);
			window.parent.frames.ImageMain.document.images[1].style.setAttribute("top", 0);

			//puts mag in upper lefthand corner regarless of where the image is scrolled to
			window.parent.frames.ImageMain.document.all.mglass.style.posLeft=0;
			window.parent.frames.ImageMain.document.all.mglass.style.posTop=0;
			window.parent.frames.ImageMain.document.all.large.style.posLeft=0;
			window.parent.frames.ImageMain.document.all.large.style.posTop=0;
			window.parent.frames.ImageMain.document.all.thumb.style.posLeft=0;
			window.parent.frames.ImageMain.document.all.thumb.style.posTop=0;
			window.parent.frames.ImageMain.document.all.large.style.clip="rect(0 0 0 0)"
			//window.parent.frames.ImageMain.scrollTo(0,0);
			break;
		default:
			break;
	}
}

function zoomImage (zwhat) {
	//alert("Hit zoomImage zwhat = " + zwhat);
	var imageOrImageName = window.parent.frames.ImageMain.document.images[2];
	//alert("Hit zoomImage zwhat = " + imageOrImageName.name);
	var width = null;
	var height = null;
	var mathop = null;
	var factor = 0.8;

	var image = typeof imageOrImageName == 'string' ? document[imageOrImageName] : imageOrImageName;
	if (document.layers) {
		var currentWidth = image.currentWidth ? image.currentWidth : image.width;
		var currentHeight = image.currentHeight ? image.currentHeight : image.height;
		//alert("zoomImage_currentWidth1 = " + currentWidth);
		//alert("zoomImage_currentHeight1 = " + currentHeight);
	}
	else {
		var currentWidth = image.width;
		var currentHeight = image.height;
		//alert("zoomImage_currentWidth2 = " + currentWidth);
		//alert("zoomImage_currentHeight2 = " + currentHeight);
	}

	hideAll('HS');
	
	var cardcount2 = window.parent.parent.parent.frames.MainHeader.document.forms[0].hdnCardCount.value;
	var currfactor = 1
	switch (zwhat) {
		case 'zcurr':
			//alert("Hit zoomImage zwhat = " + zwhat);
			if (cardcount2 == 1){
				currfactor = currfactor * factor;
			}
			else if (cardcount2 > 0){
				for (icnt = 1; icnt <= (cardcount2); icnt++){
					currfactor = currfactor * factor;
				}
			}
			else if (cardcount2 < 0){
				for (icnt = -1; icnt >= (cardcount2); icnt--){
					currfactor = currfactor / factor;
				}
			}
			
			//alert("width 1 = " + width);
			//alert("height 1 = " + width);
			if (window.parent.parent.parent.frames.MainHeader.document.forms[0].hdnOrigImgWidth.value == 0) {
				width = currentWidth/currfactor;
				height = currentHeight/currfactor;
				window.parent.parent.parent.frames.MainHeader.document.forms[0].hdnOrigImgWidth.value = currentWidth;
				window.parent.parent.parent.frames.MainHeader.document.forms[0].hdnOrigImgHeight.value = currentHeight;
			}
			else {
				width = window.parent.parent.parent.frames.MainHeader.document.forms[0].hdnOrigImgWidth.value/currfactor;
				height = window.parent.parent.parent.frames.MainHeader.document.forms[0].hdnOrigImgHeight.value/currfactor;
			}
			//alert("width 2 = " + width);
			//alert("height 2 = " + width);

			mathop = "/";
			break;
		case 'zin':
			//alert("cardcount2 = " + cardcount2)
			cardcount2 = IncCardCount();
			if (cardcount2 == 1){
				currfactor = currfactor * factor;
			}
			else if (cardcount2 > 0){
				for (icnt = 1; icnt <= (cardcount2); icnt++){
					currfactor = currfactor * factor;
				}
			}
			else if (cardcount2 < 0){
				for (icnt = -1; icnt >= (cardcount2); icnt--){
					currfactor = currfactor / factor;
				}
			}
			
			//alert("width 1 = " + width);
			//alert("height 1 = " + width);
			if (window.parent.parent.parent.frames.MainHeader.document.forms[0].hdnOrigImgWidth.value == 0) {
				width = currentWidth/currfactor;
				height = currentHeight/currfactor;
				window.parent.parent.parent.frames.MainHeader.document.forms[0].hdnOrigImgWidth.value = currentWidth;
				window.parent.parent.parent.frames.MainHeader.document.forms[0].hdnOrigImgHeight.value = currentHeight;
			}
			else {
				width = window.parent.parent.parent.frames.MainHeader.document.forms[0].hdnOrigImgWidth.value/currfactor;
				height = window.parent.parent.parent.frames.MainHeader.document.forms[0].hdnOrigImgHeight.value/currfactor;
			}
			//alert("width 2 = " + width);
			//alert("height 2 = " + width);

			mathop = "/";
			break;
		case 'zout':
			cardcount2 = DecCardCount();
			if (cardcount2 == -1){
				currfactor = currfactor * factor;
			}
			else if (cardcount2 > 0){
				for (icnt = 1; icnt <= (cardcount2); icnt++){
					currfactor = currfactor / factor;
				}
			}
			else if (cardcount2 < 0){
				for (icnt = -1; icnt >= (cardcount2); icnt--){
					currfactor = currfactor * factor;
				}
			}
			//alert("width 1 = " + width);
			//alert("currentWidth 1 = " + currentWidth);
			//alert("hdnOrigImgWidth 1 = " + window.parent.parent.parent.frames.MainHeader.document.forms[0].hdnOrigImgWidth.value);
			//alert("currfactor 1 = " + currfactor);
			if (window.parent.parent.parent.frames.MainHeader.document.forms[0].hdnOrigImgWidth.value == 0) {
				width = currentWidth*currfactor;
				height = currentHeight*currfactor;
				window.parent.parent.parent.frames.MainHeader.document.forms[0].hdnOrigImgWidth.value = currentWidth;
				window.parent.parent.parent.frames.MainHeader.document.forms[0].hdnOrigImgHeight.value = currentHeight;
			}
			else {
				width = window.parent.parent.parent.frames.MainHeader.document.forms[0].hdnOrigImgWidth.value*currfactor;
				height = window.parent.parent.parent.frames.MainHeader.document.forms[0].hdnOrigImgHeight.value*currfactor;
			}
			mathop = "*";
			break;
		case 'zorig':
			cardcount = 0;
			window.parent.parent.parent.frames.MainHeader.document.forms[0].hdnCardCount.value = 0;
			
			//alert("width 1 = " + width);
			//alert("height 1 = " + width);
			if (window.parent.parent.parent.frames.MainHeader.document.forms[0].hdnOrigImgWidth.value == 0) {
				width = currentWidth;
				height = currentHeight;
				window.parent.parent.parent.frames.MainHeader.document.forms[0].hdnOrigImgWidth.value = currentWidth;
				window.parent.parent.parent.frames.MainHeader.document.forms[0].hdnOrigImgHeight.value = currentHeight;
			}
			else {
				width = window.parent.parent.parent.frames.MainHeader.document.forms[0].hdnOrigImgWidth.value;
				height = window.parent.parent.parent.frames.MainHeader.document.forms[0].hdnOrigImgHeight.value;
			}
			//alert("width 2 = " + width);
			//alert("height 2 = " + width);
			
			mathop = "";
			break;
		case 'zfull':
			////alert("zfull");
			//var winW=WindowWidth();
			//factor=winW/currentWidth;
			////alert("winW = " + winW);
			//width = currentWidth * factor;
			//height = currentHeight * factor;
			//mathop = "*";
			break;
		default:
			//alert("Hit zoomImage zwhat = " + zwhat);
			if (cardcount2 == 1){
				currfactor = currfactor * factor;
			}
			else if (cardcount2 > 0){
				for (icnt = 1; icnt <= (cardcount2); icnt++){
					currfactor = currfactor * factor;
				}
			}
			else if (cardcount2 < 0){
				for (icnt = -1; icnt >= (cardcount2); icnt--){
					currfactor = currfactor / factor;
				}
			}
			
			//alert("width 1 = " + width);
			//alert("height 1 = " + width);
			if (window.parent.parent.parent.frames.MainHeader.document.forms[0].hdnOrigImgWidth.value == 0) {
				width = currentWidth/currfactor;
				height = currentHeight/currfactor;
				window.parent.parent.parent.frames.MainHeader.document.forms[0].hdnOrigImgWidth.value = currentWidth;
				window.parent.parent.parent.frames.MainHeader.document.forms[0].hdnOrigImgHeight.value = currentHeight;
			}
			else {
				width = window.parent.parent.parent.frames.MainHeader.document.forms[0].hdnOrigImgWidth.value/currfactor;
				height = window.parent.parent.parent.frames.MainHeader.document.forms[0].hdnOrigImgHeight.value/currfactor;
			}
			//alert("width 2 = " + width);
			//alert("height 2 = " + width);

			mathop = "/";
			break;
	}

	resizeImage(image, width, height, mathop, currfactor);
}

function resizeImage (imageOrImageName, width, height, mathop, currfactor) {
	//alert("resizeImage");
	var imageOrImageName = window.parent.frames.ImageMain.document.images[2];
	var image = typeof imageOrImageName == 'string' ? document[imageOrImageName] : imageOrImageName;
	
	if (document.layers) {
		image.currentWidth = width;
		image.currentHeight = height;
		var layerWidth = image.width > width ? image.width : width;
		var layerHeight = image.height > height ? image.height : height;
		if (!image.overLayer) {
			var l = image.overLayer = new Layer(layerWidth);
		}
		var l = image.overLayer;
		l.bgColor = document.bgColor;
		l.clip.width = layerWidth; 
		l.clip.height = layerHeight;
		l.left = image.x;
		l.top = image.y;
		var html = '';
		html += '<IMG SRC="' + image.src + '"';
		html += image.name ? ' NAME="overLayer' + image.name + '"' : '';
		html += ' WIDTH="' + width + '" HEIGHT="' + height + '">';
		l.document.open();
		l.document.write(html);
		l.document.close();
		l.visibility = 'show';

		resizeHotSpots(image, width, height, mathop, currfactor);
	}
	else {
		
		image.width = width;
		image.height = height;
		resizeHotSpots(image, width, height, mathop, currfactor);
	}
}

function resizeHotSpots (image, width, height, mathop, currfactor) {
	//alert("Hit resizeHotSpots");
	aHS = new Array(4);	
	for(nCtr = 0 ; nCtr < window.parent.frames.ImageMain.document.links.length ; nCtr++) {
		var sCoords = null;
		var newcoords = null;
		sCoords = new String(window.parent.frames.ImageMain.document.links[nCtr].title);
		aHS = sCoords.split(",");
		if (mathop == '*') {
			newcoords = String(aHS[0]*currfactor) + ',';
			newcoords = newcoords + String((aHS[1]*currfactor)) + ',';
			newcoords = newcoords + String((aHS[2]*currfactor)) + ',';
			newcoords = newcoords + String(aHS[3]*currfactor);
		}
		else {
			newcoords = String(aHS[0]/currfactor) + ',';
			newcoords = newcoords + String((aHS[1]/currfactor)) + ',';
			newcoords = newcoords + String((aHS[2]/currfactor)) + ',';
			newcoords = newcoords + String(aHS[3]/currfactor);
		}		
		window.parent.frames.ImageMain.document.links[nCtr].setAttribute("coords", newcoords);
	}
}

function BrowserDetection () {
	//alert("BrowserDetection");
	isMac = (navigator.appVersion.indexOf("Mac")!=-1) ? true : false;
	NS4 = (document.layers) ? true : false;
	IEmac = ((document.all)&&(isMac)) ? true : false;
	IE4plus = (document.all) ? true : false;
	IE4 = ((document.all)&&(navigator.appVersion.indexOf("MSIE 4.")!=-1)) ? true : false;
	IE5 = ((document.all)&&(navigator.appVersion.indexOf("MSIE 5.")!=-1)) ? true : false;
	IE6 = ((document.all)&&(navigator.appVersion.indexOf("MSIE 6.")!=-1)) ? true : false;
	ver4 = (NS4 || IE4plus) ? true : false;
	NS6 = (!document.layers) && (navigator.userAgent.indexOf('Netscape')!=-1)?true:false;

	IE5plus = IE5 || IE6;
	IEMajor = 0;

	if (IE4plus)
	{
		var start = navigator.appVersion.indexOf("MSIE");
		var end = navigator.appVersion.indexOf(".",start);
		IEMajor = parseInt(navigator.appVersion.substring(start+5,end));
		IE5plus = (IEMajor>=5) ? true : false;
	}
}  

function WindowWidth () {
	
	//alert("WindowWidth");
	ns4 = (document.layers)? true:false;
	ie4 = (document.all)? true:false;
	winW = (ns4)? window.innerWidth-16 : document.body.offsetWidth-20;
	//winH = (ns4)? window.innerHeight : document.body.offsetHeight;
	//alert("winW " + winW);
	return winW;

}

function WindowHeight () {

	//alert("WindowHeight");
	ns4 = (document.layers)? true:false;
	ie4 = (document.all)? true:false;
	winH = (ns4)? window.innerHeight : document.body.offsetHeight;
	//alert("winH " + winH);
	return winH;

}

function LeftOrRightClick() {
/*	
	if (document.layers) {
		//???????
		//if (event.which == 3) {
		//document.contextMenu.left = event.x;
		//document.contextMenu.top = event.y;
		//document.contextMenu.onmouseout = 
		//	function (event) { this.visibility = 'hide'; };
		//document.contextMenu.visibility = 'show';
		//return false;
		//}
	}
	else if (document.getElementById) {
		//alert("getElementById");
		if (event.button == 1) {
			//alert("event.button==1")
			//zoomImage(document.images[0], 1.3); void 0;
			//zoomImage(window.parent.frames.ImageMain.document.images[0], 1.3); void 0;
		}
		if (event.button == 2) {
			//alert("event.button==2");
			//zoomImage(document.images[0], 0.7); void 0;
			//zoomImage(window.parent.frames.ImageMain.document.images[0], 0.7); void 0;
		
			//MUST ADD CODE HERE TO CHECK FOR BROWSER
			//IE : Prevents PopUp Menu from displying. Returning false simply cancels the default menu.
			document.oncontextmenu = 
			function () {
				return false;
			};
			///Netscape : Prevents PopUp Menu from displying. Returning false simply cancels the default menu.
			///NN4 uses
			///Where event.which == 3 identifies the right mouse button and return false cancels the default menu.
			//document.captureEvents(Event.MOUSEDOWN);
			//document.onmousedown =
			//	function (event) {
			//	if (event.which == 3)
			//		return false;
			//	};
			///NN6 uses
			//document.onmouseup = function (event) {
			//	if (event.button == 3)
			//	event.preventDefault();
			//}
			}
	}
*/
}

function GetImageSize () {
	//alert("GetImageSize");
	try {
	    var imageOrImageName = window.parent.frames.ImageMain.document.images[2];
	    var image = typeof imageOrImageName == 'string' ? document[imageOrImageName] : imageOrImageName;
	    if (document.layers) {
		    var currentWidth = image.currentWidth ? image.currentWidth : image.width;
		    var currentHeight = image.currentHeight ? image.currentHeight : image.height;
	    }
	    else {
		    //alert("GetImageSize image.width = " + image.width);
		    var currentWidth = image.width;
		    var currentHeight = image.height;

	    }
	    if (window.parent.parent.parent.frames.MainHeader.document.forms[0].hdnCardCount.value == 0){
		    window.parent.parent.parent.frames.MainHeader.document.forms[0].hdnOrigImgWidth.value = parseInt(currentWidth);
		    window.parent.parent.parent.frames.MainHeader.document.forms[0].hdnOrigImgHeight.value = parseInt(currentHeight);
	    }
	    else {
		    zoomImage ('zcurr')
	    }
	} catch (e){}
}

// as of 10 june 03 this function is not in use anywhere kdw
function convertToUpper(field){
	field.value = field.value.toUpperCase();
}


//////////

// used in partselection
function RefreshPartDetails(sPartID,sPartNum){
	window.parent.frames.right.location.href = "partsdetail.aspx?PartID=" + sPartID;
	window.Form1.txtPart.value = sPartNum;
	try{
		window.document.getElementById(document.forms[0].hdnSessionsPartID.value).style.setAttribute("visibility", 'hidden');
	} catch (e){}
	try{
    	//alert("Hit = " + sPartID);
    	window.parent.parent.parent.frames.MainHeader.document.forms[0].hdnPartID.value = sPartID;
	} catch (e){}
	window.document.getElementById(sPartID).style.setAttribute("visibility", 'visible');
	document.forms[0].hdnSessionsPartID.value = sPartID
}

function ClearPartDetails(){
	//alert("Hit ClearPartDetails");
	try{
	    //alert("about to clear");
	    window.parent.parent.parent.frames.MainHeader.document.forms[0].hdnPartID.value = "";
	    //alert("should be clear");
	    document.forms[0].hdnSessionsPartID.value = ""
	    window.parent.frames.right.location.href = "partsdetail.aspx";
	} catch (e){
	
	    //alert("error");
	
	}
}
//-->