function validate()
{
    if(trim(document.getElementById("txtName").value)=="")
    {
        alert("Please enter Name.");
        document.getElementById("txtName").focus();
        return false;
    }
    if(trim(document.getElementById("txtEmail").value)=="")
    {
        alert("Please enter Email.");
        document.getElementById("txtEmail").focus();
        return false;
    }
    if(trim(document.getElementById("txtEmail").value)!="" && (validEmailaddress(document.getElementById("txtEmail").value)==false))
    {
        alert("Please enter correct Email.");
        document.getElementById("txtEmail").focus();
        return false;
    }
    if(trim(document.getElementById("txtPhone").value)=="")
    {
        alert("Please enter Phone Number.");
        document.getElementById("txtPhone").focus();
        return false;
    }
    return true;
}

function trim(str){
     s = str.replace(/^(\s)*/, '');
     s = s.replace(/(\s)*$/, '');
     return s;
}

function validEmailaddress(strEmail)
{
    if (strEmail=='')
    {
        return false; 
    }
    else
    {
        var ex=new RegExp(/^[a-zA-Z][\w\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$/);
	    var matches = ex.exec(strEmail);
	    if(matches==null)
		    return false; 
	    else
		 return true; 
    }
           
}

function MouseOver(obj)
{
	obj.src="images/call_me_blue_Hover.png";
}

function MouseOut(obj)
{
	obj.src="images/call_me_blue_Normal.png";
}

function confirmMessage()
{
//    if(document.getElementById("hidConfirm").value=="1")
//    {
//        alert("Call-Back information submitted successfully.")
//        document.getElementById("hidConfirm").value="0";
//        return true;
//    }
}

function MM_preloadImages() { 
  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];}}
}

function btnMouseOver(obj,btnName)
{
    if(btnName == 'btnApplyJob')
    {
        obj.src="images/btn_apply_down.gif";
    }
    else
    {
        obj.src="images/call_me_blue_Hover.png";
    }
}

function btnMouseOut(obj,btnName)
{
    if(btnName == 'btnApplyJob')
    {
        obj.src="images/btn_apply_normal.gif";
    }
    else
    {
        obj.src="images/call_me_blue_Normal.png";
    }
}