// JavaScript Document

function GetXmlHttpObject()
{
	var xmlHttp=null;
	try
	{
		// Firefox, Opera 8.0+, Safari
		xmlHttp=new XMLHttpRequest();
	}
	catch (e)
	{
	// Internet Explorer
		try
		{
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e)
		{
			xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
		}
	}
	return xmlHttp;
}

function page_load(str)
{
	var xmlhttp;			
	var s=str
	xmlHttp=GetXmlHttpObject();	
	if (xmlHttp==null)
  	{
  		alert ("Your browser does not support AJAX!");
  		return;
  	}
	var url=str;
	//alert(url);
	xmlHttp.onreadystatechange=stateChanged;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}
function feedback(str)
{
	var xmlhttp;			
	var s=str;
	name = document.enquiry.name.value;
	email = document.enquiry.email.value;
	mobile = document.enquiry.mobile.value;
	description = document.enquiry.des.value;
	//id = document.enquiry.id.value;
	xmlHttp=GetXmlHttpObject();	
	if (xmlHttp==null)
  	{
  		alert ("Your browser does not support AJAX!");
  		return;
  	} 
	var url=str+"?name="+name+"&email="+email+"&mobile="+mobile+"&description="+description;
	//alert(url);
	xmlHttp.onreadystatechange=stateChanged;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}
function applyjob(str)
{
	var xmlhttp;			
	var s=str;
	name = document.opening.name.value;
	email = document.opening.email.value;
	mobile = document.opening.mobile.value;
	address = document.opening.address.value;
	resume = document.opening.resume.value;
	comment = document.opening.comment.value;
	xmlHttp=GetXmlHttpObject();	
	if (xmlHttp==null)
  	{
  		alert ("Your browser does not support AJAX!");
  		return;
  	} 
	var url=str+"?name="+name+"&email="+email+"&mobile="+mobile+"&address="+address+"&resume="+resume+"&comment="+comment;
	xmlHttp.onreadystatechange=stateChanged;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}
function stateChanged() 
{ 
	if (xmlHttp.readyState==4)
	{ 
		
		//alert(xmlHttp.responseText);
		document.getElementById("pageload").innerHTML=xmlHttp.responseText;
		//document.getElementById("left").innerHTML="";
	}
}
function hide()
{
	document.getElementById("id").style.display='none';
	window.print();
	document.getElementById("id").style.display='';
}