// Copyright StudioFramework. All rights reserved
var isNet4, isIE4, isNet6;
// browser detect
if ( navigator.appVersion.substring(0, 1) >= 4) {
  if ( navigator.appName == "Netscape" ) {
    if ( navigator.appVersion.substring(0, 1) >= 5 ) {
      isNet6 = true;
    } else {
      isNet4 = true;
    }
  }
  if ( navigator.appName == "Microsoft Internet Explorer" ) {
    isIE4 = true
  }
}

if (isNet4) {
  doc = "document.";
  forstyle = "";
  forid = "";
  htm = ".document";
  winWidth = "window.innerWidth";
  winHeight = "window.innerHeight";
} else if (isIE4) {
  doc = "document.all.";
  forstyle = ".style";
  forid = "";
  htm = "";
  winWidth = "document.body.clientWidth";
  winHeight = "document.body.clientHeight";
} else if (isNet6) {
  doc = 'document.getElementById("';
  forstyle = '").style';
  forid = '")';
  htm = "";
  winWidth = "window.innerWidth";
  winHeight = "window.innerHeight";
}
// map zoom function
mapnum = 2;
function zoomMap(){
layerRef = eval(doc + 'mapimage' + forid);
if(mapnum == 2){layerRef.src="images/mapa.jpg"; mapnum = 1;}
if(mapnum == 3){layerRef.src="images/mapb.jpg"; mapnum = 2;}
}
function expandMap(){
layerRef = eval(doc + 'mapimage' + forid);
if(mapnum == 2){layerRef.src="images/mapc.jpg"; mapnum = 3;}
if(mapnum == 1){layerRef.src="images/mapb.jpg"; mapnum = 2;}
}
// css rollovers for navigation
// used in globaltop and globalmiddlie.html
function cssover(){
	arguments[0].style.color = "#660000";
}
function cssout(){
	arguments[0].style.color = "#000000";
}

// photoshop generated rollover scripts
function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		headliner_over = newImage("images/headliner-over.jpg");
		stearing_over = newImage("images/stearing-over.jpg");
		door_over = newImage("images/door-over.jpg");
		dash_over = newImage("images/dash-over.jpg");
		tray_over = newImage("images/tray-over.jpg");
		seat_over = newImage("images/seat-over.jpg");
		carpet_over = newImage("images/carpet-over.jpg");
		preloadFlag = true;
	}
}
// end photshop generated rollover scripts
function textdescriptover(){
	layerRef = eval(doc + 'featureItem' + forstyle);
	layerRef.display = "none";
	layerRef = eval(doc + arguments[0] + forstyle);
	layerRef.display = "block";
}
function textdescriptout(){
	layerRef = eval(doc + arguments[0] + forstyle);
	layerRef.display = "none";
	layerRef = eval(doc + 'featureItem' + forstyle);
	layerRef.display = "block";
}
function Certify(URL) {
  popupWin = window.open(URL, 'Participant', 'width=400,height=350,menubar=no,resizable=yes,scrollbars=yes')
  window.top.name = 'opener';
}
function goToAdmin(){
	if(window.event.ctrlKey && window.event.altKey){
		window.location='https://arlo.servnow.com/~usrbsb37/newsite/admin/admin.php';
	}
}
function exwindow(){
	titleName = "Lion's Automotive Upholstery Examples";
	if(window.__examples){
		return true;
	}
	else{
		if(arguments[1]){
			window.open(arguments[0], 'LionsAuto', 'height=400,width=680,scrollbars=yes,resizable=yes');return false;
		}
		else{
			window.open(arguments[0], 'LionsAuto', 'height=400,width=460,scrollbars=yes,resizable=yes');return false;
		}
	}
		
}
function showLargerImg(windowcontents){
	imageWindow = window.open(windowcontents, 'Example', 'width=330,height=330,menubar=no,resizable=yes,scrollbars=yes')
 	 imageWindow.focus();
}
