function spacebar(i)
	{
		document.write('<img src="images/spacer.gif" border="0" width="'+i+'" height="1"  align="absmiddle"/>');
	}
function setFlash(src, w, h) {
		var Flash_html = "";
		Flash_html += '<object type="application/x-shockwave-flash" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" id="param" width="'+w+'" height="'+h+'">';
		Flash_html += '<param name="movie" value="'+src+'">';
		Flash_html += '<param name="quality" value="high">';
		Flash_html += '<param name="wmode" value="transparent">';
		Flash_html += '<param name="swliveconnect" value="true">';
		Flash_html += '<embed src="'+src+'" quality=high bgcolor="#ffffff" width="'+w+'" height="'+h+'" swliveconnect="true" id="param" name="param" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"><\/embed>';
		Flash_html += '<\/object>';

		document.write(Flash_html);
	}
	
//weblink
  function OpenLinks(netvietgroup_com)
			{
				path=netvietgroup_com.weblink.options[netvietgroup_com.weblink.selectedIndex].value;
				window.open(path);
			}
//weblink
//popup
function OpenPopup(url,id,w,h)
{
lk=url+"?id=" + id + "&title=gia-vang-gold-ty-gia-ngoai-te-rate-of-exchange-thoi-tiet-weather.html";
					playnew = window.open(lk,"","width="+w+",height="+h+",scrollbars=no,resizable=no,status=no");
					playnew.focus();
}
function Popup(url,w,h)
{
lk=url;//+"&title=thank-for-netvietgroup.com.html";
					playnew = window.open(lk,"","width="+w+",height="+h+",scrollbars=yes,resizable=yes,status=no");
					playnew.focus();
}
//popup
//fullsize img
function FullSizePicture(url,productname)
{
lk="FullSizePicture.php?url=/" + url + "&productname=" + productname;
					playnew = window.open(lk,"","width=10,height=10,scrollbars=yes,resizable=yes,status=no");
					playnew.focus();
}
//fullsize img
//menu
if (document.getElementById){
document.write('<style type="text/css">\n')
document.write('.submenu{display: none;}\n')
document.write('</style>\n')
}
function SwitchMenu(obj){
	if(document.getElementById){
	var el = document.getElementById(obj);
	var ar = document.getElementById("masterdiv").getElementsByTagName("span");
		if(el.style.display != "block"){
			for (var i=0; i<ar.length; i++){
				if (ar[i].className=="submenu")
				ar[i].style.display = "none";
			}
			el.style.display = "block";
		}else{
			el.style.display = "none";
		}
	}
}
//menu

function clearText(field){

    if (field.defaultValue == field.value) field.value = '';
    else if (field.value == '') field.value = field.defaultValue;

}

var loadedobjects="loading..."
var rootdomain="http://"+window.location.hostname

function newcontent(url, containerid){
var page_request = false
if (window.XMLHttpRequest) // if Mozilla, Safari etc
page_request = new XMLHttpRequest()
else if (window.ActiveXObject){ // if IE
try {
page_request = new ActiveXObject("Msxml2.XMLHTTP")
} 
catch (e){
try{
page_request = new ActiveXObject("Microsoft.XMLHTTP")
}
catch (e){}
}
}
else
return false
page_request.onreadystatechange=function(){
loadpage(page_request, containerid)
}
page_request.open('GET', url, true)
page_request.send(null)
}

function loadpage(page_request, containerid){
document.getElementById(containerid).innerHTML="<div style='width:563px; float:left; border:solid 1px #DDDDDD; padding:2px 8px 2px 8px'><img src='images/loading.gif' align='absmiddle'/> &#272;ang t&#7843;i n&#7897;i dung...</div>"
if (page_request.readyState == 4 && (page_request.status==200 || window.location.href.indexOf("http")==-1))
document.getElementById(containerid).innerHTML=page_request.responseText
}
