path_to_root_dir = "";
var myBox = new GlassBox();
var showMyBox = function() {
	myBox.init( 'myBox', '500px', '360px', 'hidden', '', true, true );
	myBox.lbo( true, 0.30 ); 
}

   function checkWrMail()
   {
      if(isEmailFromMail()&&isEmailTitle()&&isEmailContent()){
        postclassdata("AJAX.aspx?Type=RE&Noname=N&To="+escape($("EmailTo").value)+"&From="+escape($("EmailFrom").value) +"&FromMail="+escape($("EmailFromMail").value)+"&Title="+escape($("Emailtitle").value)+"&Content="+escape($("EmailContent").value),"");
      }
      else
        alert("ÐÅÏ¢ÌîÐ´´íÎó£¡");
   }

 function isMail(){
   if (($("FromMail").value.search(/\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/) != -1)||$("FromMail").value==""){
     $("isMailWrong").style.display="none";
     return true;}
   else{
     $("isMailWrong").style.display="";
     return false;}
 }
 
  function isTitle(){
   if ($("MailTitle").value!=""){
     $("isTitleWrong").style.display="none";
     return true;}
   else{
     $("isTitleWrong").style.display="";
     return false;}
 }
 
   function isContent(){
   if ($("MailContent").value!=""){
     $("isContentWrong").style.display="none";
     return true;}
   else{
     $("isContentWrong").style.display="";
     return false;}
 }
 
    function isSender(){
   if ($("MailSender").value!=""){
     $("isSenderWrong").style.display="none";
     return true;}
   else{
     $("isSenderWrong").style.display="";
     return false;}
 }

function createxmlhttp()
{
	var xmlhttp = false;
	try	
	{
  		xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
 	} 
	catch (e) 
	{
  		try 
  		{
   			xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
  		} 
		catch (e) 
		{
   			xmlhttp = false;
 		}
 	}
	if (!xmlhttp && typeof XMLHttpRequest!='undefined') 
	{
  		xmlhttp = new XMLHttpRequest();
		if (xmlhttp.overrideMimeType)
		{
			xmlhttp.overrideMimeType('text/xml');
		}
	}
	return xmlhttp;	
}
    function postclassdata(url,data)
    {
     	var xmlhttp= createxmlhttp();
		xmlhttp.onreadystatechange=requestdata;
		xmlhttp.open("POST", url, true);
		xmlhttp.setRequestHeader("If-Modified-Since","0");
		xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		xmlhttp.send(data);
		function requestdata()
		{
     		if(xmlhttp.readyState==4)
			{
				if(xmlhttp.status==200)
				{
  		            alert(xmlhttp.responseText);
				}
			}
		}
    }

   function check()
   {
      if(isMail()&&isTitle()&&isContent()){
	  	postclassdata("GlassBox.aspx?sender="+escape($("MailSender").value)+"&from="+$("FromMail").value+"&title="+escape($("MailTitle").value)+"&content="+escape($("MailContent").value)  ,"");
      }
      else
        alert('ÐÅÏ¢ÌîÐ´´íÎó!');
   }
