/*************************************
*** ©°©¬©¬©¬©¬©¬©¬©¬©¬©¬©¬©¬©¬©¬©´ ***
*** ©®  Powered By Ma.Hong.Tao  ©® ***
*** ©®  Last Modify 2007-12-08  ©® ***
*** ©¸©¬©¬©¬©¬©¬©¬©¬©¬©¬©¬©¬©¬©¬©¼ ***
*** ©°©¬©¬©¬©¬©¬©¬©¬©¬©¬©¬©¬©¬©¬©´ ***
*** ©®mahongtao_2000@hotmail.com©® ***
*** ©¸©¬©¬©¬©¬©¬©¬©¬©¬©¬©¬©¬©¬©¬©¼ ***
*************************************/

var xmlHttp=false;

function createXmlHttp()
{
	try 
	{
		xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
	} 
	catch (e)
	{
		try
		{
			xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
		}
		catch(e2)
		{
			xmlHttp = false;
		}
	}
	if (!xmlHttp && typeof XMLHttpRequest != 'undefined')
	{
		xmlHttp = new XMLHttpRequest();
	}
}

var tempObj;

function runAJAX(strURL,returnObj)
{
	var _d=new Date();
	if(strURL.indexOf('?')>0)
			strURL+='&Temp='+_d.getTime();
		else
			strURL+='?Temp='+_d.getTime();
			
	tempObj=returnObj;
	createXmlHttp();
	xmlHttp.open("Get",strURL,true);
	xmlHttp.onreadystatechange=returnContent;
	xmlHttp.send(null);
}
function returnContent()
{
	if(tempObj&&xmlHttp.readyState==4)
	{
		tempObj.innerHTML=xmlHttp.responseText;
	}
}
// email send
function ajaxEmail(strURL)
{
	var _d=new Date();
	if(strURL.indexOf('?')>0)
			strURL+='&Temp='+_d.getTime();
		else
			strURL+='?Temp='+_d.getTime();
			
	createXmlHttp();
	xmlHttp.open("Get",strURL,true);
	xmlHttp.onreadystatechange=returnEmail;
	xmlHttp.send(null);
}
function returnEmail()
{
	if(xmlHttp.readyState==4)
    {
        
        $('resultDiv').innerHTML='Your message has been successfully sent.';
       
        setTimeout(ClearDiv,3000);
	}
	else
	{
	    $('resultDiv').innerHTML='Sending ...';	    
	}
	
}
//