
catalog_image = new Image();
catalog_image.src = "/imgs/nav_catalog_r.gif";
design_image = new Image();
design_image.src = "/imgs/nav_design_r.gif";
share_image = new Image();
share_image.src = "/imgs/nav_share_r.gif";

function hide_nav(section){
	document.images[section].src = '/imgs/nav_'+section+'.gif';
}
function show_nav(section){
	document.images[section].src = eval(section+'_image.src');
}
function black(section){
	document.getElementById(section).style.backgroundColor = '#000000';	
	document.getElementById(section).style.color = '#ffffff';	
	document.getElementById('a_'+section).style.color = '#ffffff';	
}
function white(section){
	document.getElementById(section).style.backgroundColor = '#ffffff';	
	document.getElementById(section).style.color = '#000000';	
	document.getElementById('a_'+section).style.color = '#000000';	
}
var prevsrc;

function showpic(id,imagename){
	document.getElementById('picimage').src = '/prods/'+id+'/'+imagename+'';
	prevsrc = '/prods/'+id+'/'+imagename+'';
//	document.getElementById('picimage').src = '/imgs/0.gif';
//	setTimeout("showpictimeout("+id+",'"+imagename+"')",100);	
}

function hoveroverpic(id,imagename){
	document.getElementById('picimage').src = '/prods/'+id+'/'+imagename+'';
}
function hoveroutpic(id){
	if(typeof(prevsrc) != 'undefined') document.getElementById('picimage').src = prevsrc; 

}
function showpictimeout(id,imagename){
//	prevsrc = '/prods/'+id+'/'+imagename+'';
	document.getElementById('picimage').src = '/prods/'+id+'/'+imagename+'';
}

function showgrid(){
	document.getElementById('gridtop').style.display = 'none';
	document.getElementById('gridbottom').style.display = '';
}

function hidegrid(){
	document.getElementById('gridtop').style.display = '';
	document.getElementById('gridbottom').style.display = 'none';
}

var preloadstaron = new Image();
preloadstaron.src = "/imgs/star_on.gif";
var preloadstaroff = new Image();
preloadstaroff.src = "/imgs/star_off.gif";

function starhover(starnum){
	for(i=1;i<=5;i++){
		if(i<=starnum)document.getElementById("star"+i).src=preloadstaron.src;
		else document.getElementById("star"+i).src=preloadstaroff.src;
		//document.getElementById("star"+i).onload = fnFixPng(document.getElementById("star"+i));
	}
	return true;
}
function returnhover(s1,s2,s3,s4,s5){
	for(i=1;i<=5;i++){
		if(arguments[i-1]) document.getElementById("star"+i).src=preloadstaron.src;
		else document.getElementById("star"+i).src=preloadstaroff.src;
	}	
	return true;
}

function popTerms(){
	var x = (screen.width/2) - 175;
	var y = (screen.height/2) - 210;
	var newWin = window.open('legalterms.html','legal','width=570,height=420,left='+x+',top='+y+',screenX='+x+',screenY='+y+',status=1,scrollbars=1');
	newWin.opener.name = "nakedandangry";		
}