var isNav, isIE;
    if(parseInt(navigator.appVersion) >= 4) {
      if(navigator.appName == "Netscape")
        isNav = true
      else
        isIE = true;
    }

/*Img rollover function*/
function rollover(name,source){
    document.images[name].src=source;
}	

function preLoadImages(images_array) {
	var arImageList;
	for(loop = 0; loop < images_array.length; loop++)
	{
           arImageList = new Image(); 
           arImageList.src = images_array[loop];
	}
}
function Trim(inString){
  return LTrim(RTrim(inString));
}

function LTrim(inString){
  return inString.replace(/^\s+/,'');
}

function RTrim(inString){
  return inString.replace(/\s+$/,'');
}



function openpopup(url,winName) {
	var width = 0;
	var height = 0;
		
	switch (winName){
		case "content":
			width = 650; height = 497;
			break;
		case "ship":
			width = 550; height = 550;
			break;
		case "largeview":
			width = 400; height = 480;
			break;
		case "moreinfo":
			width = 510; height = 650;
			break;
		case "verisign":
			width = 650; height = 480;
			break;	
		case "basketship":
			width = 550; height = 550;
			break;	
		case "holiday":
			width = 550; height = 480;
			break;
		case "shipping":
			width = 550; height = 550;
			break;	
		case "freeship":
			width = 605; height = 545;
			break;	
	}

	if (width > 0 && height > 0){
		launchWin(winName, url, width, height);
	}
}

function launchWin(winName, url, width, height){
	var ieIncrement = ((navigator.appName+"").indexOf("Netscape") == -1)? 15:0;
	eval(winName+"=window.open('"+ url +"','"+ winName +"','resizable=yes,scrollbars=yes,width="+ (width + ieIncrement) +",height="+ (height + ieIncrement) +",top=5,left=75')");
	eval("window."+ winName +".focus()");	
}


// takes the value and limits it to the maxlength passed in


 /* checks while typing*/
    function maxlengthCheck(txt, evtThis, maxlength){
      if(txt.value.length >= maxlength){
        if (isIE)
          event.keyCode = 0 // IE
        else 
          return false;  // Netscape
        maxlengthHack(txt, maxlength);
        return false;
      }
    }
    
    /* checks for pasted in text, etc*/
    function maxlengthHack(txt, maxlength){
      if(txt.value.length >= maxlength){
        txt.value = txt.value.substring(0,maxlength);
      }
    }



function parentWinRefresh(url){
	opener.location.href=url;
		
}

function displayLine(text){
	document.write(text+"<BR>")
		
}   