		/***********************************************
		* Dynamic Ajax Content- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
		* This notice MUST stay intact for legal use
		* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
		***********************************************/

		var bustcachevar=1 //bust potential caching of external pages after initial request? (1=yes, 0=no)
		var loadedobjects=""
		var rootdomain="http://"+window.location.hostname
		var bustcacheparameter=""

		function mypage(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)
		}
		if (bustcachevar) //if bust caching of external page
		bustcacheparameter=(url.indexOf("?")!=-1)? "&"+new Date().getTime() : "?"+new Date().getTime()
		page_request.open('GET', url+bustcacheparameter, true)
		page_request.send(null)
		}

		function loadpage(page_request, containerid){
		if (page_request.readyState == 4 && (page_request.status==200 || window.location.href.indexOf("http")==-1))
		document.getElementById(containerid).innerHTML=page_request.responseText
		}

		function loadobjs(){
		if (!document.getElementById)
		return
		for (i=0; i<arguments.length; i++){
		var file=arguments[i]
		var fileref=""
		if (loadedobjects.indexOf(file)==-1){ //Check to see if this object has not already been added to page before proceeding
		if (file.indexOf(".js")!=-1){ //If object is a js file
		fileref=document.createElement('script')
		fileref.setAttribute("type","text/javascript");
		fileref.setAttribute("src", file);
		}
		else if (file.indexOf(".css")!=-1){ //If object is a css file
		fileref=document.createElement("link")
		fileref.setAttribute("rel", "stylesheet");
		fileref.setAttribute("type", "text/css");
		fileref.setAttribute("href", file);
		}
		}
		if (fileref!=""){
		document.getElementsByTagName("head").item(0).appendChild(fileref)
		loadedobjects+=file+" " //Remember this object as being already added to page
		}
		}
		} ;
		
		function showPage(page)
		{
		if (page=="")
		  {
		  document.getElementById("txtHint").innerHTML="";
		  return;
		  }
		if (window.XMLHttpRequest)
		  {// code for IE7+, Firefox, Chrome, Opera, Safari
		  xmlhttp=new XMLHttpRequest();
		  }
		else
		  {// code for IE6, IE5
		  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
		  }
			xmlhttp.onreadystatechange=function()
		  {
			if (xmlhttp.readyState==4 && xmlhttp.status==200)
				{
				document.getElementById("loading").innerHTML = '&nbsp;';
				document.getElementById("txtHint").innerHTML=xmlhttp.responseText;
				}
			else{
				document.getElementById("loading").innerHTML = '&nbsp;Loading Content..';
				}
		  }
		  
		xmlhttp.open("GET",page,true);
		xmlhttp.send();
		} ;
		
		function checkform() 
		{
			var f = document.form;

			if (f.buyer_name.value.length== 0) {
			alert("Ketikkan nama Anda..!");
			f.buyer_name.focus();
			return false;
			}

			if (f.buyer_sex.value == "none") {
			alert("Pilih jenis kelamin Anda..!");
			f.buyer_sex.focus();
			return false;
			}

			if (f.buyer_job.value.length == 0) {
			alert("Ketikkan jabatan Anda..!");
			f.buyer_job.focus();
			return false;
			}
			
			if (f.buyer_address.value.length == 0) {
			alert("Ketikkan alamat Anda..!");
			f.buyer_address.focus();
			return false;
			}
			
			if (!EmailCheck(f.buyer_email.value)) {
			//alert("Email Anda belum diisi atau salah dalam penulisan");
			f.email.focus();
			return false;
			}
			
			if (f.buyer_hp.value.length == 0) {
			alert("Ketikkan no HP Anda..!");
			f.buyer_hp.focus();
			return false;
			}
			
			if (f.school_kind.value == "none") {
			alert("Pilih jenis sekolah..!");
			f.school_kind.focus();
			return false;
			}
			
			if (f.school_name.value.length== 0) {
			alert("Ketikkan nama sekolah, contoh:Contoh: SMKN 31 JAKARTA");
			f.school_name.focus();
			return false;
			}
			
			if (f.school_address.value.length== 0) {
			alert("Ketikkan alamat sekolah..!");
			f.school_address.focus();
			return false;
			}
			
			if (f.school_kab.value.length== 0) {
			alert("Ketikkan nama kabupaten/kota..!");
			f.school_kab.focus();
			return false;
			}
			
			if (f.school_prov.value.length== 0) {
			alert("Ketikkan propinsi..!");
			f.school_prov.focus();
			return false;
			}
			
			if (f.school_city.value.length== 0) {
			alert("Ketikkan nama kota..!");
			f.school_city.focus();
			return false;
			}
			
			if (f.school_pos.value.length== 0) {
			alert("Ketikkan kode pos..!");
			f.school_pos.focus();
			return false;
			}
			
			if (f.school_phone.value.length== 0) {
			alert("Ketikkan no telp sekolah..!");
			f.school_phone.focus();
			return false;
			}
			
			if (f.school_fax.value.length== 0) {
			alert('Ketikkan no fax sekolah atau isi dengan "-"');
			f.school_fax.focus();
			return false;
			}
			
			if (f.school_web.value.length== 0) {
			alert('Ketikkan nama website sekolah atau isi dengan "-"');
			f.school_web.focus();
			return false;
			}
			
			if (!EmailCheck(f.school_email.value)) {
			//alert("Email Anda belum diisi atau salah dalam penulisan");
			f.school_email.focus();
			return false;
			}

			if (f.package.value == "none") {
			alert("Pilih versi Aplikasi SIMSE yang akan Anda beli..!");
			f.package.focus();
			return false;
			}
			
			if (f.delivery_to.value == "none") {
			alert("Pilih alamat pengiriman CD..!");
			f.delivery_to.focus();
			return false;
			}
			
			if (f.infofrom.value == 'none') {
			alert("Pilih dari mana Anda mengetahui website ini?");
			f.infofrom.focus();
			return false;
			}

			f.action="pages/simsemenu.php";
			f.submit();
			return true;
		}
		
