//STYLESHEET CHECK
		var mac = navigator.appVersion.indexOf("Mac")>-1
		var opera = navigator.userAgent.indexOf("Opera")>-1
		
	    if (navigator.appName == "Netscape" && parseFloat(navigator.appVersion) < 5.00 && !mac){
			document.write ("<link rel=\"stylesheet\" href=\"/retail/ns_style_v5.css\" type=\"text/css\">")
		} else {
	    	document.write ("<link rel=\"stylesheet\" href=\"/retail/ie_style_v5.css\" type=\"text/css\">")
	    }


//THIS IS FOR THE COMPRA.COM STUFF
function systranURL(url) { 
	return url; 
} 


//THIS IS TO CHECK FOR NEWER VERSIONS OF IE WHEN WE WANT TO DO TRANSITIONS, ETC.
	var agt=navigator.userAgent.toLowerCase();
	var appVer = navigator.appVersion.toLowerCase();
    var iePos  = appVer.indexOf('msie');
    if (iePos !=-1) {
       is_minor = parseFloat(appVer.substring(iePos+5,appVer.indexOf(';',iePos)))
       is_major = parseInt(is_minor);
    }

	var is_ie   = ((iePos!=-1));
    var is_ie6   = (is_ie && is_major == 6);
    var is_ie6up = (is_ie && is_minor >= 6);
	
	if (is_ie && is_major == 6) {
	var ieCookieExpires = new Date();
  	ieCookieExpires.setFullYear(ieCookieExpires.getFullYear() + 1);
	document.cookie = "iebrowser=new; path=/ expires= " + ieCookieExpires.toGMTString() + ";";
	}

//NETSAGE_ IT ISN"T USED BUT NOT ALL CODE HAS BEEN REMOVED SO IT IS SET TO FALSE
		//document.write (navigator.appName + '###' + navigator.userAgent)
		//document.write("The value of navigator.appCodeName is " + navigator.appName)
	var displaySage = false
	var mac = navigator.appVersion.indexOf("Mac")>-1
	var loc = window.location
	if (navigator.userAgent.indexOf("Netscape6/6.1") != -1)  {
    displaySage = false
	}

//NS RESIZE BUG FIX
	 if(!window.saveInnerWidth) {
       window.onresize = resizeIt;
       window.saveInnerWidth = window.innerWidth;
       window.saveInnerHeight = window.innerHeight;
     }

     function resizeIt() {
         if (saveInnerWidth < window.innerWidth || 
             saveInnerWidth > window.innerWidth || 
             saveInnerHeight > window.innerHeight || 
             saveInnerHeight < window.innerHeight ) 
         {
             window.history.go(0);
         }
     }

    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; 
    		}
    		if (name == "basket") {
    	  		return "Basket Empty";
    		} else {
    			return "null";
    		}
    }

       function setCookie() {
    		}


//IE5+ REQUIRES, NETSCAPE, MACS AND OPERA NOT SUPPORTED
if(mac){
	musicLink = false;
		document.cookie = "macuser=mac;";
	}
else if (navigator.appName == "Netscape" || navigator.appName == "opera") {
	musicLink = false;
	document.cookie = "browser=netscape;";
} else {
	musicLink = true;
}


//RANDOM IMAGES FOR HOMEPAGE AND TOP RIGHT
 
 rnd.today=new Date();
 rnd.seed=rnd.today.getTime();
 function rnd() {
         rnd.seed = (rnd.seed*9301+49297) % 233280;
         return rnd.seed/(233280.0);
 };
 function rand(number) {
         return Math.ceil(rnd()*number);
 };
 

//LENMAR CONFIGURATOR

var childWnd;
function openBC(varSettings)
{
childWnd = open('http://www.lenmar.com/bc/configurator.asp?settings=' +
varSettings,'childWindow','toolbar=no,scrollbars=yes,resizable=no,width=570,height=600,top=120,left=150')
if (childWnd.opener == null) childWnd.opener = self;
}

// variable set to get the affiliate cookie
var AffTrack = GetCookie("AdTrack");
															

