function disableRightClick(e){  var message = "Error!";    if(!document.rightClickDisabled) // initialize  {    if(document.layers)     {      document.captureEvents(Event.MOUSEDOWN);      document.onmousedown = disableRightClick;    }    else document.oncontextmenu = disableRightClick;    return document.rightClickDisabled = true;  }  if(document.layers || (document.getElementById && !document.all))  {    if (e.which==2||e.which==3)    {      alert(message);      return false;    }  }  else  {    alert(message);    return false;  }}function loadpage(url,id,eval_str){    if(document.getElementById){var x=(window.ActiveXObject)?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest();}    if(x){x.onreadystatechange=function() {        el=document.getElementById(id);        el.innerHTML='<img src=\"img/spinner.gif\" width=\"16\" height=\"16\" alt=\"Loading..\" class=\"inlineimg\" />';        if(x.readyState==4&&x.status==200){            el.innerHTML='';            el=document.getElementById(id);            el.innerHTML=x.responseText;            eval(eval_str);            }        }    x.open("GET",url,true);x.send(null);    }}function makePOSTAddRequest(url, parameters) { http_request = false; if (window.XMLHttpRequest) {     http_request = new XMLHttpRequest();     if (http_request.overrideMimeType) {       http_request.overrideMimeType('text/html');     } } else if (window.ActiveXObject) {     try {       http_request = new ActiveXObject("Msxml2.XMLHTTP");     } catch (e) {       try {           http_request = new ActiveXObject("Microsoft.XMLHTTP");       } catch (e) {}     } } if (!http_request) {     alert('Lỗi XMLHTTP');     return false; } http_request.onreadystatechange = alertAdd; http_request.open('POST', url, true); http_request.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); http_request.setRequestHeader("Content-length", parameters.length); http_request.setRequestHeader("Connection", "close"); http_request.send(parameters);}function alertAdd() {   document.getElementById('loading').innerHTML = '<img src=\"img/spinner.gif\" width=\"16\" height=\"16\" alt=\"Loading..\" class=\"inlineimg\" /> '; if (http_request.readyState == 4) {     if (http_request.status == 200) {       result = http_request.responseText;       document.getElementById('loading').innerHTML = '';       document.getElementById('showresult').innerHTML = result;       document.getElementById('stf').innerHTML = '';               } else {       alert('Lỗi trong quá trình thực hiện!');     } }}function get_data(obj) {	pid = encodeURIComponent(document.getElementById("pid").value);	name = encodeURIComponent(document.getElementById("name").value);	rate = encodeURIComponent(document.getElementById("rate").value);	comment = encodeURIComponent(document.getElementById("comment").value);	var poststr = ('pid='+pid+'&name='+name+'&rate='+rate+'&comment='+comment);	makePOSTAddRequest('danh-gia.html', poststr);	commentfrm.name.value = "";	commentfrm.comment.value = "";}function bookmark() {	if(window.sidebar) { window.sidebar.addPanel(document.title,document.location.href,""); }	else if( document.all ) { window.external.AddFavorite(document.location.href,document.title); }	else { alert("Rất tiếc! Trình duyệt của bạn không hỗ trợ đặt Bookmark!"); }}function bookmarksite(title, url){	if (document.all)	window.external.AddFavorite(url, title);	else if (window.sidebar)	window.sidebar.addPanel(title, url, "")}function GoCategory(objCat){	window.open(objCat, '_top', '');}function toggle( targetId ){	if (document.getElementById)	{		target = document.getElementById( targetId );		if (target.style.display == "none")		{			target.style.display = "";		}		else		{			target.style.display = "none";		}	}}function togglebox( bid, add ){	if ( add )	{				my_show_div( my_getbyid( 'close_'+bid  ) );		my_hide_div( my_getbyid( 'open_'+bid  ) );	}	else	{		my_show_div( my_getbyid( 'open_'+bid  ) );		my_hide_div( my_getbyid( 'close_'+bid  ) );	}}function characterCounter(fieldName, maxLength, elementName){	var field = getById(fieldName);	var value = field.value.replace(/\n/g,'**');		if (value.length > maxLength){		getById(fieldName).value = getById(fieldName).value.substr(0, maxLength);	}	getById(elementName).innerHTML = getById(fieldName).value.length;}function footer() {	document.writeln('');}function banner() {	document.writeln('<embed flashvars=\"link=#\" src=\"img/banner/header.swf\" type=\"application/x-shockwave-flash\" width=\"480\" height=\"80\" />');}function headbanner() {	document.writeln('<embed flashvars=\"link=#\" src=\"img/banner/head.swf\" type=\"application/x-shockwave-flash\" width=\"616\" height=\"80\" />');}function left(){	document.writeln('');}function right(){}function forex(){	document.writeln('<table width=\'100%\' cellspacing=\'1\' cellpadding=\'3\' bgcolor=\'#333\'>');	document.writeln('<tr bgcolor=\'#222\'><td align=\'center\' width=\'50%\'>', vForexs[0],'</td><td align=\'center\' width=\'50%\'>', vCosts[0],'</td></tr>');	document.writeln('<tr bgcolor=\'#222\'><td align=\'center\'>', vForexs[1],'</td><td align=\'center\'>', vCosts[1],'</td></tr>');	document.writeln('<tr bgcolor=\'#222\'><td align=\'center\'>', vForexs[6],'</td><td align=\'center\'>', vCosts[6],'</td></tr>');	document.writeln('<tr bgcolor=\'#222\'><td align=\'center\'>', vForexs[9],'</td><td align=\'center\'>', vCosts[9],'</td></tr>');	document.writeln('<tr bgcolor=\'#222\'><td align=\'center\'>', vForexs[10],'</td><td align=\'center\'>', vCosts[10],'</td></tr>');	document.writeln('</table>');}
