 function getCost(cost, div)
{	

	prTxt="";
	price_array = cost.split(",");
	price_length = price_array.length;
	cost = "";

	for(i = 0;i < price_length; i++)
	{
		cost += price_array[i];
	}
	lprice = cost.length;
	
	if(cost ==  0)
	{
		prTxt += "";
	}
	else
	{
		if(lprice>=11)
		{
				prTxt+="";
		}
		else if(lprice==10)
		{
			prTxt+=cost.substr(0,1)+" Billion ";
			if(cost.substr(1,2)!="00")
				prTxt+=cost.substr(1,2)+" Crore ";
			if(cost.substr(3,2)!="00")
				prTxt+=cost.substr(3,2)+" Lakh";
				
			if(cost.substr(5,2)!="00" && cost.substr(5,1)!="0")
				prTxt+=" and "+cost.substr(5,2)+" Thousand";
			if(cost.substr(5,2)!="00" && cost.substr(5,1)=="0")
				prTxt+=" and "+cost.substr(6,1)+" Thousand";
		}
		else if(lprice==9)
		{
			prTxt+=cost.substr(0,2)+" Crore ";
			if(cost.substr(2,2)!="00")
				prTxt+=cost.substr(2,2)+" Lakh";
			if(cost.substr(4,2)!="00" && cost.substr(4,1)!="0")
				prTxt+=" and "+cost.substr(4,2)+" Thousand";
			if(cost.substr(4,2)!="00" && cost.substr(4,1)=="0")
				prTxt+=" and "+cost.substr(5,1)+" Thousand";
		}
		
		else if(lprice==8)
		{
			prTxt+=cost.substr(0,1)+" Crore ";
			if(cost.substr(1,2)!="00")
				prTxt+=cost.substr(1,2)+" Lakh";
			if(cost.substr(3,2)!="00" && cost.substr(3,1)!="0")
				prTxt+=" and "+cost.substr(3,2)+" Thousand";
			if(cost.substr(3,2)!="00" && cost.substr(3,1)=="0")
				prTxt+=" and "+cost.substr(4,1)+" Thousand";
		}
	
		else if(lprice==7)
		{
			prTxt+=cost.substr(0,2)+" Lakh";
	
			if(cost.substr(2,2)!="00" && cost.substr(2,1)!="0")
				prTxt+=" and "+cost.substr(2,2)+" Thousand";
			if(cost.substr(2,2)!="00" && cost.substr(2,1)=="0")
				prTxt+=" and "+cost.substr(3,1)+" Thousand";
	
		}	
		else if(lprice==6)
		{
			
				prTxt+=cost.substr(0,1)+" Lakh";
			
			if(cost.substr(1,2)!="00" && cost.substr(1,1)!="0")
				prTxt+=" and "+cost.substr(1,2)+" Thousand";
			if(cost.substr(1,2)!="00" && cost.substr(1,1)=="0")
				prTxt+=" and "+cost.substr(2,1)+" Thousand";
		}
		else if(lprice==5)
		{

			if(cost.substr(0,2)!="00" && cost.substr(0,1)!="0")
				prTxt+=cost.substr(0,2)+" Thousand(s)";
			if(cost.substr(0,1)=="0" && cost.substr(1,1)!="0") 
			prTxt+=cost.substr(1,1)+" Thousand(s)";
				
				
		}
		else if(lprice==4)
		{
		
			if(cost.substr(0,1)!="0" && cost.substr(0,2)!="00")
				prTxt+=cost.substr(0,1)+" Thousand(s)";
				
			
		}
		else if(lprice<=3)
		{
			prTxt+="";
		}
		
		if(lprice<12)
				prTxt+=" PKR";
	}
	//document.getElementById(div).innerHTML = "("+prTxt+")";
	document.getElementById(div).innerHTML = prTxt;
	
}

function showContent(event, id) 
{
	moveContent(event, id);
	obj=document.getElementById(id);
	obj.style.display="";
}

function hideContent(id) 
{
	obj=document.getElementById(id);
	obj.style.display="none";
}

function moveContent(event, id) 
{
	var x, y;
	if (navigator.appName=="Netscape")
	{
		x = event.clientX + window.scrollX;
		y = event.clientY + window.scrollY;
	}
	else
	{
		x = event.clientX + document.documentElement.scrollLeft + document.body.scrollLeft;
		y = event.clientY + document.documentElement.scrollTop + document.body.scrollTop;
	}
	obj=document.getElementById(id);
	y_add = 20;
	x_add = 20;

	obj.style.top = y + y_add + "px";
	obj.style.left = x + x_add + "px";
}
