//mouseovers
if(document.images){	
	homeOn = new Image;
	homeOn.src = "images/nav_home_on.gif"
	homeOff = new Image;
	homeOff.src = "images/nav_home_off.gif"
	productsOn = new Image;
	productsOn.src = "images/nav_products_on.gif"
	productsOff = new Image;
	productsOff.src = "images/nav_products_off.gif"
	whyOn = new Image;
	whyOn.src = "images/nav_why_on.gif"	
	whyOff = new Image;	
	whyOff.src = "images/nav_why_off.gif"
	karastanOn = new Image;
	karastanOn.src = "images/nav_karastan_on.gif"
	karastanOff = new Image;
	karastanOff.src = "images/nav_karastan_off.gif"
	specialsOn = new Image;
	specialsOn.src = "images/nav_specials_on.gif"
	specialsOff = new Image;
	specialsOff.src = "images/nav_specials_off.gif"
	servicesOn = new Image;
	servicesOn.src = "images/nav_services_on.gif"
	servicesOff = new Image;
	servicesOff.src = "images/nav_services_off.gif"
	contactOn = new Image;
	contactOn.src = "images/nav_contact_on.gif"
	contactOff = new Image;
	contactOff.src = "images/nav_contact_off.gif"
	selectionOn = new Image;
	selectionOn.src = "images/floor_selection_on.jpg"
	selectionOff = new Image;
	selectionOff.src = "images/floor_selection_off.jpg"
	valueOn = new Image;
	valueOn.src = "images/floor_value_on.jpg"
	valueOff = new Image;
	valueOff.src = "images/floor_value_off.jpg"
	serviceOn = new Image;
	serviceOn.src = "images/floor_service_on.jpg"
	serviceOff = new Image;
	serviceOff.src = "images/floor_service_off.jpg"
	areaOn = new Image;
	areaOn.src = "images/nav_area_on.gif"
	areaOff = new Image;
	areaOff.src = "images/nav_area_off.gif"
	virtualOn = new Image;
	virtualOn.src = "images/nav_virtual_on.gif"
	virtualOff = new Image;
	virtualOff.src = "images/nav_virtual_off.gif"
	
}	
function highlight(origImg, overImg){
if (document.images)
 if (overImg)
  document.images[origImg].src = eval(overImg + "On.src")
 else
  document.images[origImg].src = eval(origImg + "On.src");
}
function  resetx(img){
if (document.images)
document.images[img].src = eval(img + "Off.src");
}

function launchwin(url,wi,hi,sc,nm)
{
var v = parseInt( navigator.appVersion );
if ( v < 3 )
{
        warning_win = window.open('',nm,'width='+wi+',height='+hi+'');
        warning_win.location.href = url;
		window.link.focus();
}
	if ( v < 4 ) {
		checkWindow = window.open(url,nm,'width='+wi+',height='+hi+',screenx=200,screeny=200,resizable=yes,status=no,location=no,toolbar=no,directories=no,scrollbars='+sc+'');
		window.checkWindow.focus();
	} else 
	{
		checkW = parseInt((screen.availWidth-wi)/2);
		checkH	= parseInt((screen.availHeight-hi)/2);
		checkWindow = window.open(url,nm,'width='+wi+',height='+hi+',screenx='+checkW+',screeny='+checkH+',left='+checkW+',top='+checkH+',resizable=yes,status=no,location=no,toolbar=no,directories=no,scrollbars='+sc+'');
		window.checkWindow.focus();
	}
}


// flash check

function getCookieVal (offset) {
  var endstr = document.cookie.indexOf (";", offset);
  if (endstr == -1)
    endstr = document.cookie.length;
  return unescape(document.cookie.substring(offset, endstr));
}

function GetCookie (name) {
  var arg = name + "=";
  var alen = arg.length;
  var clen = document.cookie.length;
  var i = 0;
  while (i < clen) {
    var j = i + alen;
    if (document.cookie.substring(i, j) == arg)
      return getCookieVal (j);
    i = document.cookie.indexOf(" ", i) + 1;
    if (i == 0) 
      break;
  }
  return null;
}

function SetCookie (name, value) {
  var argv = SetCookie.arguments;
  var argc = SetCookie.arguments.length;
  var expires = (argc > 2) ? argv[2] : null;
  var path = (argc > 3) ? argv[3] : null;
  var domain = (argc > 4) ? argv[4] : null;
  var secure = (argc > 5) ? argv[5] : false;
  document.cookie = name + "=" + escape (value) +
    ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
    ((path == null) ? "" : ("; path=" + path)) +
    ((domain == null) ? "" : ("; domain=" + domain)) +
    ((secure == true) ? "; secure" : "");
}


var plugin = 0;
function check_flash (mver) {
	plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
	if ( plugin ) {
		plugin = parseInt(plugin.description.substring(plugin.description.indexOf(".")-1)) >= mver;
	}
	else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 
	   && (navigator.userAgent.indexOf("Windows 95")>=0 || navigator.userAgent.indexOf("Windows 98")>=0 || navigator.userAgent.indexOf("Windows NT")>=0)) {
		document.write('<SCRIPT LANGUAGE=VBScript\> \n');
		document.write('on error resume next \n');
		document.write('plugin = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.'+mver+'")))\n');
		document.write('</SCRIPT\> \n');
	}
}


function GetFlashName (fl1, fl2, snum) {
var flash = fl1;
		if (!(num2 = GetCookie(flash+'snum'))) num2 = 0;
		if (snum <= num2) {// show second flash
			flash = fl2;
		}
		else {
			num2++;
			var expdate = new Date();
			expdate.setTime(expdate.getTime() + (30*365*24*60*60));
			SetCookie(flash+'snum',num2,expdate);
		}
return flash;
}


function flash2html (flash, w, h, pic, fver, ff, fl2, snum) {

var fver = (fver > 0) ? fver : 3; // min flash version
var ff = (ff) ? ff : false; //force_flash
var snum = (snum > 0) ? snum : 1;

check_flash (fver);

	if ( plugin || ff) {

	if (fl2) flash = GetFlashName (flash, fl2, snum);
		document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+fver+',0,0,0" width="'+w+'" height="'+h+'">');
		document.write('<param name=movie value="'+flash+'">');
		document.write('<param name=quality value=high>');
		document.write('<embed src="'+flash+'" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="'+w+'" height="'+h+'">');
		document.write('</embed>');
		document.write('</object>');
	} else if (!(navigator.appName && navigator.appName.indexOf("Netscape")>=0 && navigator.appVersion.indexOf("2.")>=0)){
		document.write('<IMG SRC="'+pic+'" WIDTH="'+w+'" HEIGHT="'+h+'" BORDER="0">');
	}
}

function flash_or_html (flash, w, h, func, fver, ff, fl2, snum) {

var fver = (fver > 0) ? fver : 3; // min flash version
var ff = (ff) ? ff : false; //force_flash
var snum = (snum > 0) ? snum : 1;
check_flash (fver);

	if ( plugin || ff) {		
		if (fl2) flash = GetFlashName (flash, fl2, snum);
			document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+fver+',0,0,0" width="'+w+'" height="'+h+'">');
			document.write('<param name=movie value="'+flash+'">');
			document.write('<param name=quality value=high>');
			document.write('<embed src="'+flash+'" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="'+w+'" height="'+h+'">');
			document.write('</embed>');
			document.write('</object>');
		} else if (!(navigator.appName && navigator.appName.indexOf("Netscape")>=0 && navigator.appVersion.indexOf("2.")>=0)){
			eval(func);
	}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
