    var isIE = false;
    var isFF = false;
    var isSa = false;
    
    if ((navigator.userAgent.indexOf("MSIE")>0) && (parseInt(navigator.appVersion) >=4))isIE = true;
    if(navigator.userAgent.indexOf("Firefox")>0)isFF = true;
    if(navigator.userAgent.indexOf("Safari")>0)isSa = true;
    
    function windowinit()
    {
        //document.getElementById('cpraid').style.display = "";
    }
                 
    
    function pop(id) 
    {                       
        var obj = $(id) ;
        if(obj)
        {  
            obj.className = "select";
            obj.style.display = "";
            if(id == 'service')
            {                       
                $('cpraid').style.display = "none";
            }
            else if(id == 'cpraid')
            {                   
                $('service').style.display = "none";  
            }                
        }
    }
     
    function hid() 
    {      
        if(serviceshow) 
        {
            $('cpraid').style.display = "none";
            $('service').style.display = "";
        }   
        else if(cprshow)
        {
            $('cpraid').style.display = "";
            $('service').style.display = "none";
        }       
        else
        {
            $('cpraid').style.display = "none";
            $('service').style.display = "none";
        }       
    }   
    
    function show2(obj) {
        var o = document.getElementById(obj);
        if(o)
        o.style.display = '';
    }
    function hide2(id)
    {
        var obj = document.getElementById(id);
        if(obj)
            obj.style.display = 'none';   
    }

    function onlyNumber(e)
    {
        var key;
        iKeyCode = window.event?e.keyCode:e.which;
        if( !(((iKeyCode >= 48) && (iKeyCode <= 57)) || (iKeyCode == 13) || (iKeyCode == 46) || (iKeyCode == 45) || (iKeyCode == 37) || (iKeyCode == 39) || (iKeyCode == 8)))
        {   
            if (isIE)
            {
                e.returnValue=false;
            }
            else
            {
                e.preventDefault();
            }
        }
    } 

function checkemail(email)
{
   var rec = /\b(^(\S+@).+((\.com)|(\.net)|(\.org)|(\.info)|(\.edu)|(\.mil)|(\.gov)|(\.biz)|(\.ws)|(\.us)|(\.tv)|(\.cc)|(\..{2,2}))$)\b/;
   return  rec.test(email);
}

function check_contact_form()
{
    var email = $('contact[email]').value;
    if(!checkemail(email))
    {    
        alert('please type correct email address!like eu@eu.com');
        return false; 
    }
	var form = $('form');
	var alltextinput = form.getInputs('text');

	for(i=0;i< alltextinput.length;i++)
	{   
		if(alltextinput[i].value == "")
		{
			alert('Please fill all blank infos!');
			return false;
		}

	}
}