function bC(th,s,i){
	if (navigator.appVersion.indexOf("MSIE") != -1){
	document.write("<link href=\"/skins/"+th+"/"+s+"/css/estyle.css\" type=\"text/css\" rel=\"stylesheet\" />");
	}
	else 
	document.write("<link href=\"/skins/"+th+"/"+s+"/css/noIEestyle.css\" type=\"text/css\" rel=\"stylesheet\" />");
}

function pC(p,th,s){
	if (p == 3){
		document.write("<script language=\"JavaScript\" src=\"/JS/scripts/popWin.js\" type=\"text/javascript\"></script>");
	}
	else if (p == 8){
		document.write("<script language=\"javascript\" src=\"/JS/scripts/checkout.js\" type=\"text/javascript\"></script>");
	}
	else if (p == 10){
		document.write("<link href=\"/skins/"+th+"/"+s+"/css/print.css\" type=\"text/css\" rel=\"stylesheet\" media=\"print\" />");
	}
	document.write("<script language=\"JavaScript\" src=\"/JS/scripts/jserv.js\" type=\"text/javascript\"></script>");
}
function checkMe(ghj){
	d=document;
	if(ghj !=''){
		document.write(ghj);
		d.getElementById("sugg").style.display='';
		d.getElementById("suggh").style.display='';
	}
}
function showTrio(){
	a = document.getElementById("itemnotehead");
	a.style.display='';
	b = document.getElementById("itemnote");
	b.style.display='';
	c = document.getElementById("trionote");
	c.style.display='';
}
function trioCheck(r,x){
	if(r.indexOf('Ring') != ''){
		engage = x.indexOf('-E');
		ladies = x.indexOf('-L');
		gents = x.indexOf('-G');
		if(engage != -1){
			y = "an Engagement Ring";
			document.write("The <b>"+x+"</b> is "+y+" that is part of a Trio Wedding Set. All parts of the Trio Set are sold seperately, and the price above reflects only the Engagement Ring.<br>");
			showTrio();
		}
		if(ladies != -1){
			y = "a Ladies Wedding Band";
			document.write("The <b>"+x+"</b> is "+y+" that is part of a Trio Wedding Set. All parts of the Trio Set are sold seperately, and the price above reflects only the Wedding Band.<br>");
			showTrio();
		}
		if(gents != -1){
			y = "a Mens Wedding Band";
			document.write("The <b>"+x+"</b> is "+y+" that is part of a Trio Wedding Set. All parts of the Trio Set are sold seperately, and the price above reflects only the Wedding Band.<br>");
			showTrio();
		}
	}
}
function showDiaNote(){
	a = document.getElementById("itemnotehead");a.style.display='';
	b = document.getElementById("itemnote");b.style.display='';
	c = document.getElementById("dianote");c.style.display='';
	d = document.getElementById("seminote");d.style.display='';
}
function weightHack(x,gw,dw){
	d = document;
	if(x !=' '){
		s = x;
		var quar = 5.7;
		var nick = 5.0;
		var dime = 2.3;
		var pacl = .5;
	
		y = x.split(" ");
		z = y.length;
		for(i=0; i<z; i++){
			if(y[i].indexOf('.') != -1){
				a = y[i] / nick;
				a = Math.round(a*100)/100;
				if(a <.50){t = "Weighs less than half of a nickel"; }
				else if(a <1 && a >=.50){ t = "Weighs less than a nickel"; }
				else if(a >1){
					r = Math.round(a);
					if(r==1){b = '';}else{b = 's';}
					t = "Weighs about "+r+" nickel"+b; 
				}
				d.write(s+ " ("+t+")");		
			}
		}
	}
	if(gw !=''){
		if(x !=' '){
			d.write("<br>"+gw);
		}
		else{ d.write(gw); }
	}
	if(dw !=''){
		if(x != ' ' || gw != ''){
			d.write("<br>"+dw);
		}
		else{ d.write(dw); }
	}
	if(gw !='' || dw !=''){
		showDiaNote();
	}		
}
function weightCheck(x,gw,dw){
	if(x == '' && gw == '' && dw == ''){
		d.getElementById("weighthead").style.display='none';
		d.getElementById("weightInfo").style.display='none';
		d.getElementById("weightDisc").style.display='none';
	}
}
function itemRange(x,y){
	if(x != ''){
		st = x.replace(/(<([^>]+)>)/ig," ");
		f = st.match(/\$[0-9]*\.[0-9]*/gi);
		i = f.length-1;
		if(f[0] != f[i]){
			document.write(f[0]+" - "+f[i]);
		}
		else{
			document.write("$"+y);
		}
	}
	else{
		document.write("$"+y);
	}
}
function suggSell(x){
	x = x.replace(/\<[\/]?tr\>/ig,'');
	m = x.split('</td><td');
	r=0;
	var nx = '';d = document;
	if(m.length <6){i=0;}
	else{i = Math.round(Math.random()*((m.length-4)-1))+1;}
	for(i;i<m.length;i++){
		if(r != 4){
		if(m[i].indexOf('javascript:Item('+d.forms[0].sku.value+')') == -1){
			if(d.getElementById("weightInfo").style.display !='none' || d.getElementById("itemnote").style.display !='none'){
				d.getElementById("suggSellhead").style.margin='5px 0px 5px 0px';
				d.getElementById("suggSell").style.margin='-10px 0px 5px 0px';
			}
			m[i] = m[i].replace(/\<td/ig,''); m[i] = m[i].replace(/\<\/td\>/ig,'');
			m[i] = m[i].replace(/height\=\"24\"/ig,''); m[i] = m[i].replace(/width\=\"50\%\"/ig,'');
			o = m[i].split('<br>');nx+='<td width="125" '+o[0]+'<br>'+o[1]+'</td>';r++;
		}
		}
	}
	if(nx == ''){
		d.getElementById("suggSellhead").style.display='none';d.getElementById("suggSell").style.display='none';
	}
	else{
		t = '<table border="0" id="suggTable" cellspacing="10" align="center" style="table-layout:fixed "><tr>';t += nx;t +='</tr></table>';
		document.write(t);
	}
}
function web(a,b,c){
 	document.write('<a title='+c+' href=\"mailto:'+a+'@'+b+'\">');
 	document.write(c+'</a>');
}function sizeDD(x,y){
	d = document.getElementsByName("Stock");
	if(d.length == 0){
		if(x != '0'){
		document.write("Size: "+x);
		}
		else if(x == '0'){
			var w = y.match(/\w[\!-\~]*\-[0-9]*\w/ig);
			if(w != null){
				im = y.replace(/\w[\!-\~]*\-/ig,'');
				document.write("Size: "+im);
			}
			else{
				document.getElementById("dd").style.display='none';
			}
		}
	}
}