// JavaScript Document



function clearLabel(id,lbl)
{
	var txt=document.getElementById(id);
	if(txt.value==lbl)	
	txt.value="";
}

function setLabel(id,lbl)
{
	var txt=document.getElementById(id);
	if(txt.value=="")
	txt.value=lbl;
}

function checkQS(qs)
{
	if(qs.txtName.value=="Name")
	{
	alert('Enter Contact Name');
	qs.txtName.focus();
	return false;
	}else if(qs.txtEmail.value=="E-mail")
	{
	alert("Enter Email Address");
	qs.txtEmail.focus();	
	return false;
	}else if(echeck(qs.txtEmail.value)==false)
	{
		alert("Enter valid Email Address");
	qs.txtEmail.select();			
	qs.txtEmail.focus();		
		return false;
	}else if(qs.txtMsg.value=="Message")
	{
		alert("Enter your Requirement/Comment");
	qs.txtMsg.focus();		
		return false;
		
	}else
	return true;
	
}

/* Check Quick Quote */

function checkQQ(qs)
{
	if(qs.txtName.value=="")
	{
	alert('Enter Contact Name');
	qs.txtName.focus();
	return false;
	}else if(qs.txtEmail.value=="")
	{
	alert("Enter Email Address");
	qs.txtEmail.focus();	
	return false;
	}else if(echeck(qs.txtEmail.value)==false)
	{
		alert("Enter valid Email Address");
	qs.txtEmail.select();			
	qs.txtEmail.focus();		
		return false;
	}else if(qs.selService.value=="")
	{
		alert("Select your Area of Service Requirment");
		return false;
	}else if(qs.txtMsg.value=="Message")
	{
		alert("Enter your Requirement/Comment");
		return false;
	}else
	return true;
	
}
	

function checkRequestForm(qs)
{
	if(qs.txtName.value=="")
	{
	alert('Enter Contact Name');
	qs.txtName.focus();
	return false;
	}else if(qs.txtEmail.value=="")
	{
	alert("Enter Email Address");
	qs.txtEmail.focus();	
	return false;
	}else if(echeck(qs.txtEmail.value)==false)
	{
		alert("Enter valid Email Address");
	qs.txtEmail.select();			
	qs.txtEmail.focus();		
		return false;
	}else if(qs.txtIMEmail.value=="")
	{
	alert("Enter Instant Messenger Email Address");
	qs.txtIMEmail.focus();	
	return false;
	}else if(echeck(qs.txtIMEmail.value)==false)
	{
	alert("Enter valid IM Email Address");
	qs.txtIMEmail.select();			
	qs.txtIMEmail.focus();		
	return false;	
	}else if(qs.txtPhone.value=="")	
	{
		alert("Enter Contact Number");
		qs.txtPhone.focus();
		return false;
	}else if(checkInternationalPhone(qs.txtPhone.value)==false)
	{
		alert("Enter a Valid Contact Number");		
		qs.txtPhone.focus();
		qs.txtPhone.select();		
		return false;
	}else if(qs.txtNeed.value=="")
	{
		alert("Enter your Requirement/Comment");
		qs.txtNeed.focus();
		return false;
	}else if(CheckDocument('txtAttachment')==false)
	{
		alert("Select Word Document / Adobe PDF Document Only");
		qs.txtAttachment.focus();
		return false;
	}else
	return true;
	
}
	

function formatField(id,status)
{
	var field=document.getElementById(id);
	if(status)
	{
		field.style.borderColor='#0066CC';
		field.style.backgroundColor='#B7DBFF';
	}else
	{
		field.style.borderColor='#CCC';
		field.style.backgroundColor='#FFF';		
	}
}


function checkJobPost(qs)
{
	if(qs.txtName.value=="")
	{
	alert('Enter Contact Name');
	qs.txtName.focus();
	return false;
	}else if(qs.txtEmail.value=="")
	{
	alert("Enter Email Address");
	qs.txtEmail.focus();	
	return false;
	}else if(echeck(qs.txtEmail.value)==false)
	{
		alert("Enter valid Email Address");
	qs.txtEmail.select();			
	qs.txtEmail.focus();		
		return false;
	}else if(qs.txtJob.value=="")
	{
		alert("Select the Job you want to Applied");
		qs.txtJob.focus();
		return false;
	}else if(CheckCV('txtCV')==false)
	{
		alert("Attach your CV \n\nWord Document / Adobe PDF Document Only");
		qs.txtCV.focus();
		return false;
	}else if(qs.txtMsg.value=="Message")
	{
		alert("Enter your Comment about your Career");
		return false;
	}else
	return true;
}

