// JavaScript Document
function popup(lebar, tinggi, location ){
	lebar=lebar+50;
	var kiri=(screen.width - lebar )/ 2;
	var atas=(screen.height - tinggi) / 2;
	window.open(location,'','width='+lebar+',height='+tinggi+',resizeable=no,scrollbars=yes,toolbar=no,status=no,top='+atas+',left='+kiri);
}
function printpage() {
  window.print();
}
function shipAddAct(show){
	if(show.checked==true){
		hideDiv();
	}else{
		showDiv();
	}
}
function hideDiv() {
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById('hideshow').style.visibility = 'hidden';
		document.getElementById('hideshow').style.display = 'none';
	}else {
		if (document.layers) { // Netscape 4
			document.hideshow.visibility = 'hidden';
			document.hideshow.display = 'none';
		}else { // IE 4
			document.all.hideshow.style.visibility = 'hidden';
			document.all.hideshow.display = 'none';
		}
	}

}

function showDiv() {
	
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById('hideshow').style.visibility = 'visible';
		document.getElementById('hideshow').style.display = '';
	}else {
		if (document.layers) { // Netscape 4
			document.hideshow.visibility = 'visible';
			document.hideshow.visibility = '';
		}else { // IE 4
			document.all.hideshow.style.visibility = 'visible';
			document.all.hideshow.display = '';
		}
	}
} 

function createRequestObject() {
    var ro;
    var browser = navigator.appName;
    if(browser == "Microsoft Internet Explorer"){
        ro = new ActiveXObject("Microsoft.XMLHTTP");
    }else{
        ro = new XMLHttpRequest();
    }
    return ro;
}

var xmlhttp = createRequestObject();
function save_shp(site_url){
	//startLoading();
	var form = document.frm2;
	alert(url);
		
	var url="http://"+site_url+"/pulgin/Tell_Friends/process.php";
	alert(url);
	xmlhttp.open('GET', url, true);
	xmlhttp.onreadystatechange = function() {
		if (xmlhttp.readyState == 4 && xmlhttp.status == 200){
			alert(url);
			document.getElementById("shipping_alert").innerHTML = xmlhttp.responseText;	
		 	//finishLoading()
		}
	}
	xmlhttp.send(null);

}
