browser_name = navigator.appName;
browser_version = parseFloat(navigator.appVersion);

if (browser_name == "Netscape" && browser_version >= 3.0) { roll = 'true'; }
else if (browser_name == "Microsoft Internet Explorer" && browser_version >= 3.0) { roll = 'true'; }
else { roll = 'false'; }

function over(img,ref) { if (roll == 'true') { document.images[img].src = ref; } }
function out(img,ref)  { if (roll == 'true') { document.images[img].src = ref; } }

function preloadImg(file){
  image = new Image();
  image.src = file;
}

function rol_img() {
preloadImg('img/cart/arrow1-on.gif');
}

function HideShow (par,t) {
var lay=document.getElementById(par);

if (t==0) { lay.style.visibility="visible"; lay.style.display="block";}
if (t==1) { lay.style.visibility="hidden"; lay.style.display="none"; }

}

function selectModel (td,color,colorf) {
arrayOfStrings = td.split("|");
for (var i = 0; i < arrayOfStrings.length; i++) {
	document.getElementById(arrayOfStrings[i]).style.background=color; 
	document.getElementById(arrayOfStrings[i]).style.color=colorf;
	}
}

function menu (td,p,color,colorf,img)
{
if (p==1) {
document.getElementById(td).style.color=colorf;
document.getElementById(td).style.fontSize=img;
}
if (p==2) {
document.getElementById(td).style.background=color+' url(img/'+img+') no-repeat right'; 
document.getElementById(td).style.color=colorf; 
}
if (p==3) {
document.getElementById(td).style.background=color+' url(img/'+img+') no-repeat center'; 
document.getElementById(td).style.color=colorf; 
document.getElementById(td).style.textDecoration="underline"; 
}

}
function menuIns (td,p,color,colorf,img)
{
if (p==1) {
document.getElementById(td).style.background=color+' url(img/'+img+') no-repeat left'; 
//document.getElementById(td).style.color=colorf;
//document.getElementById(td).style.textDecoration="underline"; 
}
if (p==2) {
document.getElementById(td).style.background=color+' url(img/'+img+') no-repeat center top'; 
//document.getElementById(td).style.color=colorf;
document.getElementById(td).style.textDecoration="none"; 
}

}

function menuImg (td,p,color,colorf)
{
if (p==1) {
document.getElementById(td).style.backgroundImage='url(img/'+color+')'; 
document.getElementById(td).style.color=colorf;
}
if (p==2) {
document.getElementById(td).style.backgroundImage='url(img/'+color+')';
document.getElementById(td).style.color=colorf; 
}

}

function add_click (url,target) {
if (url) {
//alert("Debug:"+url);
//alert("Debug:"+target);
if (target=="_parent") {
parent.location.href=url;
}
if (target=="_blank") {
window.open(url);
}
if (target=="_self") {
location.href=url;
}
if (target=="_top") {
top.location.href=url;
}
}//end if !url
}