//portfolio pop-up
function validenq(frm){
if(frm.person.value==""){
alert("Please Enter name of contact person");
frm.person.focus();
return false;
}
if(frm.organizationvalue==""){
alert("Please Enter Organization");
frm.organization.focus();
return false;
}
if(frm.city.value==""){
alert("Please Enter City");
frm.city.focus();
return false;
}
if(frm.zip.value==""){
alert("Please Enter Zip");
frm.zip.focus();
return false;
}
if(frm.address.value==""){
alert("Please Enter Address");
frm.address.focus();
return false;
}
if(frm.comments.value==""){
alert("Please Enter Comments");
frm.comments.focus();
return false;
}
if(frm.phoneno.value==""){
alert("Please Enter Phone no.");
frm.phoneno.focus();
return false
}
if(frm.emailid.value==""){
alert("Please enter your Email Address.");
return false;
frm.emailid.focus();
}
if(frm.emailid.value!=""){
	var x = frm.emailid.value;
	var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
	if (!filter.test(x)){ alert('Invalid Email Address.');
	frm.emailid.focus();
	return false;
	}
	}

return true;
}

function showportfolio(path1)
{

window.open(path1,"portfolio","scrollbars=no,left=10,top=10,width=778,height=550")

}

//quick contact validations
function clear12(field,text){
if(text=='name'){
if(field.value=="Name"){
field.value="";
}
if(document.frm1.organization.value==""){
document.frm1.organization.value="Organization";
}
if(document.frm1.city.value==""){
document.frm1.city.value="City";
}
if(document.frm1.zip.value==""){
document.frm1.zip.value="Zip";
}
if(document.frm1.address.value==""){
document.frm1.address.value="Address";
}
if(document.frm1.phone.value==""){
document.frm1.phone.value="Phone";
}
if(document.frm1.email.value==""){
document.frm1.email.value="Email";
}
if(document.frm1.comments.value==""){
document.frm1.comments.value="Comments";
}
}
if(text=='phone'){
if(field.value=="Phone"){
field.value="";
}
if(document.frm1.name.value==""){
document.frm1.name.value="Name";
}
if(document.frm1.organization.value==""){
document.frm1.organization.value="Organization";
}
if(document.frm1.city.value==""){
document.frm1.city.value="City";
}
if(document.frm1.zip.value==""){
document.frm1.zip.value="Zip";
}
if(document.frm1.address.value==""){
document.frm1.address.value="Address";
}
if(document.frm1.email.value==""){
document.frm1.email.value="Email";
}
if(document.frm1.comments.value==""){
document.frm1.comments.value="Comments";
}
}
if(text=='email'){
if(field.value=="Email"){
field.value="";
}
if(document.frm1.name.value==""){
document.frm1.name.value="Name";
}
if(document.frm1.organization.value==""){
document.frm1.organization.value="Organization";
}
if(document.frm1.city.value==""){
document.frm1.city.value="City";
}
if(document.frm1.zip.value==""){
document.frm1.zip.value="Zip";
}
if(document.frm1.address.value==""){
document.frm1.address.value="Address";
}
if(document.frm1.phone.value==""){
document.frm1.phone.value="Phone";
}
if(document.frm1.comments.value==""){
document.frm1.comments.value="Comments";
}
}
if(text=='comments'){
if(field.value=="Comments"){
field.value="";
}
if(document.frm1.name.value==""){
document.frm1.name.value="Name";
}
if(document.frm1.organization.value==""){
document.frm1.organization.value="Organization";
}
if(document.frm1.city.value==""){
document.frm1.city.value="City";
}
if(document.frm1.zip.value==""){
document.frm1.zip.value="Zip";
}
if(document.frm1.address.value==""){
document.frm1.address.value="Address";
}
if(document.frm1.phone.value==""){
document.frm1.phone.value="Phone";
}
if(document.frm1.email.value==""){
document.frm1.email.value="Email";
}
}
}
function valid(frm){
if(frm.name.value=="" || frm.name.value=="Name"){
alert("Please enter your Name.");
return false;
frm.name.focus();
}
if(frm.organization.value=="" || frm.organization.value=="Organization"){
alert("Please enter your Organization.");
return false;
frm.name.focus();
}
if(frm.address.value=="" || frm.address.value=="Address"){
alert("Please enter your Address.");
return false;
frm.name.focus();
}
if(frm.city.value=="" || frm.city.value=="City"){
alert("Please enter your City.");
return false;
frm.name.focus();
}
if(frm.zip.value=="" || frm.zip.value=="Zip"){
alert("Please enter your Zip.");
return false;
frm.name.focus();
}
if(frm.phone.value=="" || frm.phone.value=="Phone"){
alert("Please enter your Phone Number.");
return false;
frm.phone.focus();
}

if(frm.email.value=="" || frm.email.value=="Email"){
alert("Please enter your Email Address.");
return false;
frm.email.focus();
}
if(frm.email.value!=""){

	var x = frm.email.value;

	var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;

	if (!filter.test(x)){ alert('Invalid Email Address.');

	frm.email.focus();

	return false;

	}

if(frm.comments.value=="" || frm.comments.value=="Comments"){
alert("Please enter your Comments.");
return false;
frm.comments.focus();
}
	}

return true;
}


