var agt=navigator.userAgent
var yourOS="PC"
if (agt.indexOf("Mac")!=-1)
   {yourOS='Mac'}
var yourBrowse="IE"
if (navigator.appName == 'Netscape')
   {yourBrowse="NS"}
if (navigator.appVersion.substr(22,1) >= "5")
{ver5="Yes"}

if((yourOS=="Mac" && yourBrowse=="NS")||(yourOS=="Mac" && yourBrowse=="IE" && ver5 != "Yes")){
        document.write('<LINK rel="stylesheet" href="/css/mainMAC.css" type="text/css">')
}
else{
        document.write('<LINK rel="stylesheet" href="/css/main.css" type="text/css">')
}

function toplightboxrefresh() {
	if (parent == top){
		parent.frames[1].location = "/bin/Cklb?ref=/bin/Search?n~1^fmt~table";
	} else {
		 parent.location = "/bin/Cklb?ref=/bin/Search?n~1^fmt~table";
	}
}

function topcartrefresh() {
	if (parent == top){
		parent.frames[1].location = "/bin/Cklb?ref=/bin/Cart?op~view";
	} else {
		 parent.location = "/bin/Cklb?ref=/bin/Cart?op~view";
	}
}

var ggsession = ggetCookie("gmpsess");
var ggusert = ggetCookie("usert");

function topsearchrefresh() {
        if (ggsession && ggusert) {
	// logged in
                if (parent.content.left){
                        parent.content.left.location= "/user/search.shtml";
                } else {
                        parent.content.location= "/user/search.shtml";
                }
        } else {
                        parent.content.location= "/user/search.shtml";
        }
}

function topsearchrefreshpower() {
	if (parent == top){
		parent.frames[1].location = "/bin/Cklb?ref=/user/search_advanced.shtml";
	} else { 
		parent.location = "/bin/Cklb?ref=/user/search_advanced.shtml";
	}
}

function topsearchconcept() {
	if (parent == top){
		parent.frames[1].location = "/bin/Cklb?ref=/search_concept.shtml";
	} else { 
		parent.location = "/bin/Cklb?ref=/search_concept.shtml";
	}
}

function tload(dref)
{
	if(parent.thetop.href != dref){
		parent.thetop.location=dref;
	}
}

function siderefresh()
{
parent.left.location.replace('/bin/Search?n=1&mr=all');

}

function csiderefresh(id)
{
  if (id){
  parent.left.location.replace('/bin/Cart?op=view&lc='+ id);
  }
  else {
  parent.left.location.replace('/bin/Cart?op=view');
  }
}
function VersionNavigateur(Netscape, Explorer) {
  if ((navigator.appVersion.substring(0,3) >= Netscape && navigator.appName == 'Netscape') ||      
      (navigator.appVersion.substring(0,3) >= Explorer && navigator.appName.substring(0,9) == 'Microsoft'))
    return true;
else return false;
}
function netie(net, ie) {
  if ((navigator.appVersion.substring(0,3) >= net && navigator.appName == 'Netscape' && net != -1) || (navigator.appVersion.substring(0,3) >= ie && navigator.appName.substring(0,9) == 'Microsoft' && ie != -1))
    return true;
else return false;
}

function cceditWindow()
{
  ccedit_window =
    window.open("https://argus.auroraquanta.com/bin/Profile?cc=1","ccedit","width=500,height=320,status=1");
}



// all new functions
function addlb(id) {
		if (parent.lb) {
			var theurl= '/bin/ExLbAdd?id=' + id ;
			parent.lb.location=theurl;
		} else {
			var theurl= '/bin/Cklb?atlb=' + id;
			self.location=theurl;
		}
}
function addcart2(id) {
		if (parent.lb) {	
			parent.lb.location='/bin/Cart?op=add&id=' + id + '&fmt=index';
            parent.com.location='/user/cart_menu.shtml';

		} else {
			var theurl= '/bin/Cklb?atct=' + id;
			self.location=theurl;
		}
}

function relatedkeywords (qq){
        self.location.href='/bin/Search2?frmloc=detailjs&Keywords=' + qq;
}


