
  
  var s=screen.width;
  res1 = ""; res = "";
  if(s<801){res1 = "800/";}
  if(s<1279){res = "1280/";}
  var alisaPic = new Image(410,260);
  alisaPic.src = "../../../../jstock/pictures/web/jewellery/0/0_0_2.jpg";
  
  //moves the page to 0,0 and resizes it
  if(screen.width<1350)top.window.moveTo(0,0);
  
  if(screen.width>1280){var wid = 1280; var hei = 1024;}
  else{var wid = screen.availWidth; var hei = screen.availHeight;}
  
  if (document.all) {top.window.resizeTo(wid,hei);}
  else if (document.layers||document.getElementById) {
  if (top.window.outerHeight<screen.availHeight||top.window.outerWidth<screen.availWidth){
  top.window.outerHeight = hei;
  top.window.outerWidth = wid;
  }
  }
  var afiliate = unescape(parent.window.location.search);
  var afiliatestring = "?"
  var beginPositionAfiliate = afiliate.indexOf(afiliatestring)
  var afiliate1 =(afiliate.substring(beginPositionAfiliate+4,beginPositionAfiliate+1))
  var afiliate2 =((afiliate.substring(beginPositionAfiliate+4,beginPositionAfiliate))+'_NE');
  if (afiliate2=='_NE')afiliate2 = "?cd0_NE"
  if ((afiliate2.length < 2)||(afiliate2==null)){afiliate2="?cd0"}
  
  var appVer = navigator.appVersion.toLowerCase();
  var agt = navigator.userAgent.toLowerCase();
  var doc = document.location;
  var addr = document.location.href;
  
  var goo = (addr.indexOf('goo')!=-1)?true:false;
  var rep = (addr.indexOf('rep')!=-1)?true:false;
  
  var mac = ((appVer.indexOf("mac")!=-1)||(appVer.indexOf("ppc")!=-1))?true:false;
  var saf = (appVer.indexOf("safari")!=-1)?true:false;
  var is_gecko = ((!saf)&&(navigator.product)&&(navigator.product.toLowerCase()=="gecko"))?true:false;
  var moz = (agt.indexOf("mozilla/5")!=-1&&agt.indexOf("compatible")==-1&&agt.indexOf('opera')==-1&&is_gecko&&((navigator.vendor=="")||(navigator.vendor=="Mozilla")||(navigator.vendor=="Debian")))?true:false;
  var ope = (agt.indexOf("opera")!=-1)?true:false;
  var iePos  = appVer.indexOf('msie');
  var is_ie = ((iePos!=-1)&&!ope&&!saf)?true:false;
  var is_fb = ((agt.indexOf('mozilla/5')!=-1) && (agt.indexOf('spoofer')==-1) && (agt.indexOf('compatible')==-1) && (agt.indexOf('opera')==-1)  && (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1) && (is_gecko) && (navigator.vendor=="Firebird"))?true:false;
  var is_fx = ((agt.indexOf('mozilla/5')!=-1) && (agt.indexOf('spoofer')==-1) && (agt.indexOf('compatible')==-1) && (agt.indexOf('opera')==-1)  && (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1) && (is_gecko) && (agt.indexOf('firefox')!=-1))?true:false;
  if(is_fx){var vers = agt.split("firefox/"); fx_ver = vers[1];}// fx_ver*=1;}
  var net = (agt.indexOf("mozilla")!=-1&&agt.indexOf("compatible")==-1&&!ope&&!moz&&!saf&&!is_fx)?true:false;
  
  //set Netscape variables dependent on version no.
  var newNet = (net&&agt.indexOf('netscape/8')!=-1)?true:false;
  var oldNet = (net&&is_major<8&&is_minor<8)?true:false;
  
  var imgRef="";
  var imgRef3="-";
  
  if(addr.indexOf('imgRef=')!=-1){
  var addr2 = addr.split('imgRef=');
  if(addr2[1]){
  if(addr2[1].length>=5){
  var imgRef5 = addr2[1].split("&");//x,x&'googleTaGs'
  var imgRef4 = imgRef5[0];//xx,xx
  }
  else{
  var imgRef4 = addr2[1];
  }
  if(imgRef4.indexOf(",")!=-1){
  var imgRef3 = imgRef4;//xx,xx 
  var imgRef2 = imgRef3.split(",");
  var imgRef = imgRef2[0]+imgRef2[1];//xx
  
  if(imgRef=="00"||imgRef=="06"||imgRef=="10"||imgRef=="20"||imgRef=="60"||imgRef=="51"||imgRef=="025"){imgRef="_"+imgRef;}
  else{imgRef="";}
  }
  }
  }
  
  //language
  if(net||saf||moz||is_fx){language = navigator.language}
  else{language = navigator.browserLanguage}
  var fr = (language.indexOf('fr')==0)?true:false;
  //	if(fr){document.location.replace('http://www.cooldiamonds.com/site_francais/cd_1024newfr/cd_1024newfr.html'+afiliate2);}
  if(fr){document.location.replace('http://www.cooldiamonds.fr');}
  function open_popup(page) {
  window.open(page);
  return false;
  }
  
  function shopGo(lang)
  {
  document.getElementById('ifrTb').style.visibility="visible";
  document.body.style.backgroundImage="url(../../../../jstock/pictures/web/blank1.gif)";
  document.getElementById('mainTab').style.display = "none";
  if(screen.width<801){
  var logo = document.getElementById('titlePic'); 
  logo.parentNode.removeChild(logo);
  }
  }
  function organisePage(country,lang,s)
  {
  var ifr = document.getElementById('ifr');
  var titlePic = document.getElementById('titlePic');
  var bodyNode = document.getElementById('bodyNode');
  var ftQuote2 = document.getElementById('ftQuote2');
  
  if(s>1279){
  document.body.style.backgroundImage="url(../../../../jstock/pictures/web/firstpageversace2"+imgRef+".jpg)";
  if (country=="IE"){document.body.style.backgroundImage="url(../../../../jstock/pictures/web/firstpageversace2ie2"+imgRef+".jpg)";}
  titlePic.src = "../../../../jstock/pictures/web/cooldiamonds12r.jpg";
  if(net||saf||moz||is_fx){document.getElementById('centreCell').className = "centreCell_FF";}
  if(imgRef){ 
  document.getElementById('shopLoadingCell').className = "shopLoadingCell";
  document.getElementById('centreCell').className = "centreCell_00";
  document.getElementById('moneyBackText').className = "moneyBackText_00";
  document.getElementById('tdR').className = "sideTd";
  document.getElementById('tdL').className = "sideTd";
  }
  var vert="43";
  if(net||saf||moz||is_fx){vert = "50"}
  bodyNode.style.backgroundPosition = "48% "+vert+"%";
  }
  else if(s<801){
  document.getElementById('style').href="../../../../jstock/css/styles0800.css" ;
  document.body.style.backgroundImage="url(../../../../jstock/pictures/web/firstpageversace8002"+imgRef+".jpg)";
  if (country=="IE"){document.body.style.backgroundImage="url(../../../../jstock/pictures/web/firstpageversace8002"+imgRef+".jpg)";}
  if(titlePic){titlePic.src = "../../../../jstock/pictures/web/cooldiamonds8r.jpg";}
  ftQuote2.innerHTML = "";
  if(!is_fx){ifr.style.width = "102.5%";}
  if(net||saf||moz||is_fx){document.getElementById('centreCell').className = "centreCell_FF";}
  var vert="29";
  //vert is negative for fx because ifrTb's position is absolute
  if(net||saf||moz||is_fx){vert = "-31";}
  bodyNode.style.backgroundPosition = "48% "+vert+"%";
  }
  else{
  document.getElementById('style').href="../../../../jstock/css/styles01024.css";
  document.body.style.backgroundImage="url(../../../../jstock/pictures/web/firstpageversace2"+imgRef+".jpg)";
  if (country=="IE"){document.body.style.backgroundImage="url(../../../../jstock/pictures/web/firstpageversace2ie2"+imgRef+".jpg)";}
  titlePic.src = "../../../../jstock/pictures/web/cooldiamonds10ra.jpg";
  if(imgRef){
  document.getElementById('shopLoadingCell').className = "shopLoadingCell";
  document.getElementById('centreCell').className = "centreCell_00";
  document.getElementById('moneyBackText').className = "moneyBackText";
  document.getElementById('tdR').className = "sideTd";
  document.getElementById('tdL').className = "sideTd";
  }
  var vert = "41";
  if(net||saf||moz||is_fx){vert = "-44";}
  bodyNode.style.backgroundPosition = "48% "+vert+"%";
  }
  
  imgRef=imgRef.substring(1,imgRef.length);
  var shopLocation="../../../../jstock/web/en/diamond-rings.jsp";
 if (lang=="EN"){shopLocation="../../../../jstock/web/en/diamond-rings.jsp"}
 if (lang=="GER"){shopLocation="../../../../jstock/web/ge/diamantringe.jsp"}
  ifr.src = shopLocation+afiliate2+"&imgRef="+imgRef3+"&mac="+mac+"&saf="+saf+"&is_gecko="+is_gecko+"&moz="+moz+"&ope="+ope+"&is_ie="+is_ie+"&is_fb="+is_fb+"&is_fx="+is_fx+"&net="+net+"&country="+country+"&lang="+lang+"&curr="+curr;
  }
  