
function openmodalWin(type) 
{
	if (type=="1") {
		if (screen) {
	        y = (screen.availHeight - 250)/2;
	        x = (screen.availWidth - 420)/2;
	    }	
		var returnedValue = window.showModalDialog("content_signin.php","name","dialogWidth:420px;dialogHeight:270px; center:yes; dialogLeft:"+x+"px; dialogTop:"+y+"px;status:no");
		if(returnedValue != null  && returnedValue != 'closed'){
			//alert ("value:"+returnedValue);						
		//	
		}	
	} 
	else {
		if (screen) {
			y = (screen.availHeight - 800)/2;
			x = (screen.availWidth - 500)/2;
		}
		window.open('content_signup.php','name','height=700,width=600,toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,modal=yes, screenX='+x+', screenY='+y);
	}
}

function onLogout(){
	var url="getValidateUserLogin.php?act=logout";
	rlogout = new Ajax.Request(url, {
		asynchronous:false, 
		evalScripts:true, 
		method: 'get',
		onSuccess: function(response) {												 
			if (response.readyState  == 4){
				if (200 == response.status){					
					document.getElementById("div_Signin").innerHTML = response.responseText;
				}
			}
		}	
	}); 
}
function ShowGoldPrice(){
		var sHTML = '';	
		sHTML = sHTML.concat('<table border="0px" cellpadding="2px" cellspacing="1px" class="tbl-goldprice">');
		sHTML = sHTML.concat('	<tr>');
		sHTML = sHTML.concat('		<td class="td-weather-title" style="font-size:10px;width:46%;color:#FFFFFF;">Gold</td>');
		sHTML = sHTML.concat('		<td class="td-weather-title" style="text-align:center;font-size:10px;width:27%;color:#000000;">Buy</td>');
		sHTML = sHTML.concat('		<td class="td-weather-title" style="text-align:center;font-size:10px;width:27%;color:#000000;">Sell</td>');
		sHTML = sHTML.concat('	</tr>');
		sHTML = sHTML.concat('	<tr>');
		sHTML = sHTML.concat('		<td class="td-weather-title" style="color:#000000;">SBJ</td>');
		sHTML = sHTML.concat('		<td class="td-weather-data txtr" style="color:#000000;">').concat(vGoldSbjBuy).concat('</td>');
		sHTML = sHTML.concat('		<td class="td-weather-data txtr" style="color:#000000;">').concat(vGoldSbjSell).concat('</td>');
		sHTML = sHTML.concat('	</tr>');
		sHTML = sHTML.concat('	<tr>');
		sHTML = sHTML.concat('		<td class="td-weather-title" style="color:#000000;">SJC</td>');
		sHTML = sHTML.concat('		<td class="td-weather-data txtr" style="color:#000000;">').concat(vGoldSjcBuy).concat('</td>');
		sHTML = sHTML.concat('		<td class="td-weather-data txtr" style="color:#000000;">').concat(vGoldSjcSell).concat('</td>');
		sHTML = sHTML.concat('	</tr>');
		sHTML = sHTML.concat('</table>');
		document.getElementById("eGold").innerHTML = sHTML;
	}
	//ShowGoldPrice();
	
function ShowForexRate()
	{
		var sHTML = '';
		sHTML = sHTML.concat('<table border="0px" cellpadding="2px" cellspacing="1px" class="tbl-weather" style="color:#000000;">');
		for(var i=0;i<vForexs.length;i++){
			sHTML = sHTML.concat('	<tr>');
			sHTML = sHTML.concat('		<td class="td-weather-title" style="color:#000000;">').concat(vForexs[i]).concat('</td>');
			sHTML = sHTML.concat('		<td class="td-weather-data txtr" style="color:#000000;">').concat(vCosts[i]).concat('</td>');
			sHTML = sHTML.concat('	</tr>');
		}
		sHTML = sHTML.concat('</table>');
		document.getElementById("eForex").innerHTML = sHTML;
	}