function extlinks() {
 if (!document.getElementsByTagName) return;
 var anchors = document.getElementsByTagName("a");
 for (var i=0; i<anchors.length; i++) {
   var anchor = anchors[i];
   if (anchor.getAttribute("href") &&
       anchor.getAttribute("rel") == "external")
     anchor.target = "_blank";
 }
}

function showLayer(layerName, shadowLayerName)
        {
            if (document.getElementById) // Netscape 6 and IE 5+
            {
                var targetElement = document.getElementById(layerName);
                var shadowElement = document.getElementById(shadowLayerName);
                targetElement.style.top = shadowElement.style.top;
                targetElement.style.visibility = 'visible';
            }
        }


function hideLayer(layerName)
        {
            if (document.getElementById) 
            {
                var targetElement = document.getElementById(layerName);
                targetElement.style.visibility = 'hidden';
            }
        }

function showDetails(itemName) {
	var newWindow=window.open('','itemDetail','width=650,height=500,scrollbars,resizable');
	var docTxt = "<html><head><title>" + itemName + "</title></head>";
	docTxt+="<body align=center marginwidth=5 bgcolor=#000000 text=#000000>";
	docTxt+="<img src='images/" + itemName + ".jpg'><br/><a href='javascript:window.close()';><img src='img/closewindow.gif' border=0></a>";
	docTxt+="</body></html>";
	newWindow.document.write(docTxt);
	newWindow.document.close();
	newWindow.focus()
}

function setOption(frm) {
 	var str1 = frm.item_name.options[frm.item_name.selectedIndex].text;
	//var str1 = frm.item_name.value;
	//alert(str1);
	frm.SelectedOption.value = str1.substring(0,(str1.indexOf("/$") - 1));
	frm.amount.value = str1.substring((str1.indexOf("/$") + 2), str1.length);
	//splt = str1.split("/$");
	//frm.SelectedOption.value = splt[0];
	//frm.amount.value = splt[1];
	//alert("Selected option: " + frm.SelectedOption.value);
	//alert("Price: " + frm.amount.value);
}

function showPop(id) {
	document.getElementById(id).style.visibility = "visible";
}

function hidePop(id) {
	document.getElementById(id).style.visibility = "hidden";
}

