
function showHide(vid, bool)
{
	if(bool)
		document.getElementById(vid).className="shw";
	else
		document.getElementById(vid).className="hid";
}



function reCalBrowerHeight()
{
	document.body.style.height = document.body.scrollHeight + "px";	
}


function buttonOver(id, isrc, bool) {
	if(bool)
	{
        isrc = isrc.replace(/.gif/gi,"_over.gif");
		document.getElementById(id).src = isrc;
	}
	else
	{
		 isrc = isrc.replace(/_over.gif/gi,".gif");
		document.getElementById(id).src = isrc;
	}
}


//detail page
function TabView(n) {

    document.getElementById("tabCont" + n).className = "shw";
    document.getElementById("lstTab" + n).className = "tabon";

    for (i = 1; i < 3; i++) {
        if (i != n) {

            document.getElementById("tabCont" + i).className = "hid";
            document.getElementById("lstTab" + i).className = "taboff";
        }
    }
    reCalBrowerHeight();
}

function priceSup(id, price){
	if(price.indexOf(".") > -1)
	{
		var scr = price.split(".");
		var sup = scr[0] + "<sup>." + scr[1] + "</sup>";
		document.getElementById(id).innerHTML = sup;
	}else{
		document.getElementById(id).innerHTML = price;
	}
}



var tempHtmlContent; 
function printC() { 
   if (document.all && window.print) { 
       window.onbeforeprint = beforeDivs; 
       window.onafterprint = afterDivs; 
       window.print(); 
   } 
} 
function beforeDivs () { 
   if (document.all) { 
       var rng = document.body.createTextRange( ); 
       if (rng!=null) { 
           //alert(rng.htmlText); 
           tempHtmlContent = rng.htmlText; 
           rng.pasteHTML("<table border=0 align=center><tr><td align=center>"  
                                       + document.all("divPrint").innerHTML + "</td></tr></table>"); 
       } 
   } 
} 
function afterDivs () { 
   if (document.all) { 
       var rng = document.body.createTextRange( ); 
           if (rng!=null) { 
                       rng.pasteHTML(tempHtmlContent); 
           } 
   } 
} 


function addBookmark(siteUrl, pageTitle)
{
	
	if(navigator.appName =='Microsoft Internet Explorer')
	{	//IE	
		window.external.AddFavorite(siteUrl, pageTitle);
	}
	else if(navigator.appVersion.indexOf("Netscape") > -1 )
	{		
		//Fiorefox
		window.sidebar.addPanel(pageTitle, siteUrl,"");
	}
	else
	{
		alert("Sorry, your browser doesn't support this.");
	}
}
