

NS4 = (document.layers); 
NS6 =  ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) == 5)) 
IE4 = (document.all); 
ver4 = (NS4 || IE4); 
MAC45 = (navigator.appVersion.indexOf("MSIE 4.5") != -1) 
isMac = (navigator.appVersion.indexOf("Mac") != -1); 




function UploadForm_submit()
{
// Create a random session identifier. 
var Session = new String(); 
Session = Math.floor(Math.random() * 0xFFFFFF).toString(16); 

// append identification of session 
document.UploadForm.action += "&Session=" + Session;

// open the pop-up window 
window.open("status.ad2?Session="+Session,"upload","width=200,height=200"); 
}

function noFlash()
{
	window.open("homeNoFlash.ad2","UpgradeWindow","width=200,height=310"); 
}


function buynow(productID)
{
	window.open("buynow.ad2?productID="+productID,"BuyNowWindow","width=500,height=200,resizable=1,location=1"); 
}




function restoreStyles(){
  inputList = document.getElementsByTagName("INPUT");
  for(i=0;i<inputList.length;i++)
    inputList[i].style.backgroundColor = "";
  selectList = document.getElementsByTagName("SELECT");
  for(i=0;i<selectList.length;i++)
    selectList[i].style.backgroundColor = "";
}
  
function wait(){
delay = 700;
string="restoreStyles("+delay+");";
setTimeout(string,delay);
}







//alert("Browser IE? : " + IE4);
function moveMe(Xpos){
		//myFlashNavigationLayer = document.getElementById("Layer1");
		//myFlashNavigationLayer.style.pixelLeft= Xpos;
			//alert("2 isMac : " + isMac);
		
		myFlashNavigationLayer = document.getElementById("Layer1");
		myFlashNavigationLayer.style.left = Xpos;
}

function initFlashNav(){
	
		myFlashNavigationLayer = document.getElementById("Layer1");
		myFlashNavigationLayer.style.left = -600;
		wait();

}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);


function hideSelect(){
	var toHide = document.getElementsByTagName('SELECT');
	if (toHide) {
		for (var i = 0; i < toHide.length; i++) {
			toHide.item(i).style.visibility = 'hidden';
		}
	}
}

function showSelect() {
	var toShow = document.getElementsByTagName('SELECT');
	
	if (toShow) {		
		for (var i = 0; i < toShow.length; i++) {
			toShow.item(i).style.visibility = 'visible';
		}
	}
}

function jumpto(resultPage) {
	var myValue = window.event.srcElement.value;
	if (myValue != 0) {
		window.location.href(resultPage + "?category=" + myValue);
	}
}

function dealerSearchCheck() {
	return false;
	var myFormType = document.getElementById('national_dealer_locator');
	var state = document.getElementById('state');
	var city = document.getElementById('city');
	var radius = document.getElementById('radius');
	var zipcode = document.getElementById('zipcode');
	
	if (zipcode.value != "") {
	} else if ((state.value != "") && (city.value != "")) {
	} else {
		document.getElementById('national_dealer_error').style.visibility = "visible";
	}
}

function evaluate(myName, myValue){
	if (myName == "state") {
		window.location.href("dealer_locator.ad2?state=" + myValue);
	} else if (myName == "country") {
		window.location.href("international_dealer_locator_results.ad2?country=" + myValue);
	} else if (myName == "distributor") {
		window.location.href("distributor_results.ad2?country=" + myValue);
	}
}

function opensaysme(pageToLoad, winName, width, height, center) {
                                     xposition=0; yposition=0;
    if ((parseInt(navigator.appVersion) >= 4 ) && (center)){
        xposition = (screen.width - width) / 2;
        yposition = (screen.height - height) / 2;
    }
    args = "width=" + width + "," 
    + "height=" + height + "," 
    + "location=0," 
    + "menubar=0,"
    + "resizable=0,"
    + "scrollbars=0,"
    + "status=0," 
    + "titlebar=0,"
    + "toolbar=0,"
    + "hotkeys=0,"
    + "screenx=" + xposition + ","  //NN Only
    + "screeny=" + yposition + ","  //NN Only
    + "left=" + xposition + ","     //IE Only
    + "top=" + yposition;           //IE Only

    window.open( pageToLoad,winName,args );
}