var prodPrice_isNav = false;
var prodPrice_isIE  = false;
var prodPrice_isNav7  = false;

var prodPrice_Top = 0;
var prodPrice_Left = 0;
var prodPrice_Height = 100;
var prodPrice_Width = 300;
var prodPrice_RenderPage;
var prodPrice_BrowserType;
var prodBGColor ="#4F80A8";// "#00526E";


var strPrice = ""

if (navigator.appName == "Netscape"){
    prodPrice_isNav = true;   
	if(navigator.appVersion.indexOf("5.0") == 0)
		prodPrice_isNav7 = true
}else{
    prodPrice_isIE = true;
}

function prodPrice_Initialize(top,left,height,width,BrowserType,valueStr)
{
	
	prodPrice_BrowserType = BrowserType;
	prodPrice_RenderPage = "";
	prodPrice_Top = top;
	prodPrice_Left  = left;
	
	if(prodPrice_isNav7){
		prodPrice_Top = prodPrice_Top - 14;
		prodPrice_Left  = prodPrice_Left  + 20;
	}

	prodPrice_Height = height;
	prodPrice_Width = width;
	strPrice = valueStr;
	prodPrice_setLayers();
}



function prodPrice_showTable(){
		prodPrice_buildTopCalFrame();		
}

function prodPrice_buildTopCalFrame()
{	
	var strTemp;
	if (prodPrice_isNav)
	{
		//bgcolor='#00526E'
		//bgcolor='#FFFFFF'
		strTemp = "<TABLE width='150' cellpadding=1 cellspacing=0 border=0 HEIGHT='21' >"
		strTemp = strTemp + "<TR bgcolor='"+ prodBGColor +"'><TD><TABLE width='100%' HEIGHT='20' cellpadding=0 cellspacing=0 border=0>"
		strTemp = strTemp + "<TR bgcolor='#FFFFFF'><TD><font size=1 face='verdana, arial, Helvetica' color='#000000'><B>Your Price: $" + strPrice + "</B></TD></TR>"
		strTemp = strTemp + "</TABLE></TD></TR></TABLE>"		
	}else
	{
		strTemp = "Your Price: $" + strPrice
	}
		
	//namedFilterTop = namedFilterTop + "</td></tr></table>";
    prodPrice_RenderPage =  strTemp;   
    return;
}

function prodPrice_setLayers()
{	
	prodPrice_showTable();
  
	if(prodPrice_BrowserType=="IE")
	{
		if (prodPrice_isIE)
		{
			window.document.write("<Div id='productPriceLayer' style='position: relative;  z-index: 120; width:162px;	height:29px; background-color:#FFFFFF; font-family:verdana;	font-size:12px;	font-weight:bold; padding:5px; color:#000000; border-color: "+ prodBGColor +"; border-width: 1px 1px 1px 1px; border-style: solid;'> ");
			window.document.write(prodPrice_RenderPage);
			window.document.write("</Div>");
		
		}
	}
	else
	{		
		if (prodPrice_isNav && prodPrice_isNav7)
		{			
			window.document.write("<DIV id='productPriceLayer' style='position:absolute ;LEFT:"+prodPrice_Left+"; TOP:"+prodPrice_Top+"; VISIBILITY:HIDDEN ; height:"+prodPrice_Height+"; width:"+prodPrice_Width+"' > ");
			window.document.write(prodPrice_RenderPage);
			window.document.write("</DIV>");
			
			document.getElementById('productPriceLayer').style.visibility="hidden" 
			document.getElementById('productPriceLayer').style.visibility="visible" 
		}else{
			window.document.write("<Layer visibility=true id='productPriceLayer' PAGEX='"+prodPrice_Left+"' PAGEY='"+prodPrice_Top+"' WIDTH='"+prodPrice_Width+"' HIEGHT='"+prodPrice_Height+"' zindex='120'  > ");
			window.document.write(prodPrice_RenderPage);
			window.document.write("</Layer>");
		}

	}
		
}
function prodPrice_writeFilterList(strVal)
{
	strPrice = strVal;	
	prodPrice_buildTopCalFrame()
	if ( prodPrice_isIE){
		productPriceLayer.innerHTML 
		= prodPrice_RenderPage;
	}else{			
		if(prodPrice_isNav7){
			document.getElementById('productPriceLayer').innerHTML = prodPrice_RenderPage;
			document.getElementById('productPriceLayer').style.visibility="hidden" 
			document.getElementById('productPriceLayer').style.visibility="visible" 
		}else{
			window.document.productPriceLayer.document.open();
			window.document.productPriceLayer.document.write(prodPrice_RenderPage);
			window.document.productPriceLayer.document.close(); 
		}
	}	
}