function getFile(pURL,pos) {
   if (window.XMLHttpRequest) {
      xmlhttp = new XMLHttpRequest();
      xmlhttp.onreadystatechange = function(){
		  postFileReady(pos);
	  }
      xmlhttp.open("GET", pURL, true);
      xmlhttp.send(null);
   } else if (window.ActiveXObject) {
      xmlhttp = new ActiveXObject('Microsoft.XMLHTTP'); 
      if (xmlhttp) {
         xmlhttp.onreadystatechange = function(){
		  postFileReady(pos);
	  }
         xmlhttp.open('GET', pURL, false);
         xmlhttp.send();
		 xmlhttp.close()
      }
   }
}

function postFileReady(pos) {
   if (xmlhttp.readyState==4) {
      if (xmlhttp.status==200) { 
         document.getElementById('page').innerHTML = xmlhttp.responseText;
		 if(pos){
			document.location="#"+pos 
		 }
      }
   }else{
	   document.getElementById('page').innerHTML = "<div class='loading'>Loading...</div>"
   }
}

function fixObjects(){
	theObjects = document.getElementsByTagName("object");
	for (var i = 0; i < theObjects.length; i++) {
		theObjects[i].outerHTML = theObjects[i].outerHTML;
	}
}

function openIMG(img,wi,he){
	sWidth = screen.width
	sHeight = screen.height
	pWidth = wi
	pHeight = he
	posx = (sWidth/2) - (pWidth/2)
	posy = (sHeight/2) - (pHeight/2)
	dest="showing.asp?img="+img+"&w="+wi+"&h="+he
	window.open (dest,"Omega","toolbar=no,scrollbars=no,directories=no,menubar=no,width="+pWidth+",height="+pHeight+",left="+posx+",top="+posy+"");
}

function validateF(){
	frm = document.contactF
	if(frm.fname.value==""){
		alert("Please enter your name.")
		frm.fname.focus()
		return false;
	}
	if (!echeck(frm.email.value)){
		frm.email.focus();
		return false;
	}
	if(frm.comment.value==""){
		alert("Please enter your Comment.")
		frm.comment.focus()
		return false;
	}
	return true;
}

function show(id){
	var anchorTags = document.getElementsByTagName("a");
	for (var i = 0; i < anchorTags.length ; i++){
		if (anchorTags[i].className.match("menuItemClick")||anchorTags[i].className.match("mItem")){
			anchorTags[i].className= "mItem"; 
		}
	}
	if(id){
		document.getElementById(id).className =  "menuItemClick";
	}
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}