<!--
function fundingCheck() {
	alertMsg = "";
	if (document.form1.CompanyName.value == "") {
		if (!alertMsg) document.form1.CompanyName.focus();
		alertMsg += "Company Name\n";
	}
	if (document.form1.CityStateZip.value == "") {
		if (!alertMsg) document.form1.CityStateZip.focus();
		alertMsg += "City, State, Zip\n";
	}
	if (document.form1.Signer.value == "") {
		if (!alertMsg) document.form1.Signer.focus();
		alertMsg += "Signer\n";
	}
	if (document.form1.Phone.value == "") {
		if (!alertMsg) document.form1.Phone.focus();
		alertMsg += "Phone\n";
	}
	if (document.form1.BusinessStructure.options[document.form1.BusinessStructure.selectedIndex].value == "") {
		if (!alertMsg) if (!alertMsg) document.form1.BusinessStructure.focus();
		alertMsg += "Business Structure\n";
	}
	if (document.form1.YearsInBusiness.value == "") {
		if (!alertMsg) document.form1.YearsInBusiness.focus();
		alertMsg += "Years In Business\n";
	}
	if (document.form1.BorrowerName.value == "") {
		if (!alertMsg) document.form1.BorrowerName.focus();
		alertMsg += "Borrower Name\n";
	}
	if (document.form1.BorrowerSSN.value == "") {
		if (!alertMsg) document.form1.BorrowerName.focus();
		alertMsg += "Borrower Social Security Number\n";
	}
	if (document.form1.BorrowerHomeAddress.value == "") {
		if (!alertMsg) document.form1.BorrowerHomeAddress.focus();
		alertMsg += "Borrower Home Address\n";
	}
	if (document.form1.BorrowerCity.value == "") {
		if (!alertMsg) document.form1.BorrowerCity.focus();
		alertMsg += "Borrower City\n";
	}
	if (document.form1.BorrowerState.value == "") {
		if (!alertMsg) document.form1.BorrowerState.focus();
		alertMsg += "Borrower State\n";
	}
	if (document.form1.BorrowerZip.value == "") {
		if (!alertMsg) document.form1.BorrowerZip.focus();
		alertMsg += "Borrower Zip\n";
	}
	if (document.form1.Email.value == "") {
		if (!alertMsg) document.form1.Email.focus();
		alertMsg += "E-mail\n";
	}
	// end
	if (!alertMsg) {
		return true;
	}
	else{
		alert("\nWe don't have enough information to process your submission.\nPlease enter:\n\n" + alertMsg);
		return false;
	}
}
function checkBannerState() {
	alertMsg = "";
	if (document.form1.title.value == "") {
		document.form1.title.focus();
		alertMsg += "Banner Name\n";
	}
	if (document.form1.href.value == "") {
		if (!alertMsg) document.form1.href.focus();
		alertMsg += "Web Link\n";
	}
	if (document.form1.stateList.options[document.form1.stateList.selectedIndex].value == "") {
		if (!alertMsg) document.form1.stateList.focus();
		alertMsg += "State\n";
	}
	if (document.form1.image_link.value == "") {
		if (!alertMsg) document.form1.image_link.focus();
		alertMsg += "Banner Image\n";
	}
	// end
	if (!alertMsg) {
		return true;
	}
	else{
		alert("\nWe don't have enough information to process your submission.\nPlease enter:\n\n" + alertMsg);
		return false;
	}
}

function userCheck() {
	alertMsg = "";
	if (document.form1.first_name.value == "") {
		document.form1.first_name.focus();
		alertMsg += "First Name\n";
	}
	if (document.form1.last_name.value == "") {
		document.form1.last_name.focus();
		alertMsg += "Last Name\n";
	}
	if (document.form1.address1.value == "") {
		document.form1.address1.focus();
		alertMsg += "Address\n";
	}
	if (document.form1.city.value == "") {
		if (!alertMsg) document.form1.city.focus();
		alertMsg += "City\n";
	}
	if (document.form1.state.options[document.form1.state.selectedIndex].value == "") {
		if (!alertMsg) document.form1.state.focus();
		alertMsg += "State\n";
	}
	if (document.form1.zip.value == "") {
		if (!alertMsg) document.form1.zip.focus();
		alertMsg += "Zip\n";
	}
	if (document.form1.phone.value == "") {
		if (!alertMsg) document.form1.phone.focus();
		alertMsg += "Phone\n";
	}
	// end
	if (!alertMsg) {
		return true;
	}
	else{
		alert("\nWe don't have enough information to process your submission.\nPlease enter:\n\n" + alertMsg);
		return false;
	}
}
function listingCk() {
//    var list = document.form1.state;
//    alert(document.form1.state.options[document.form1.state.selectedIndex].value);
//    alert(theValue);
//    return false;
}
function listingCheck() {
	alertMsg = "";
	if (document.form1.companyName.value == "") {
		document.form1.companyName.focus();
		alertMsg += "Company Name\n";
	}
	if (document.form1.address1.value == "") {
		document.form1.address1.focus();
		alertMsg += "Address\n";
	}
	if (document.form1.city.value == "") {
		if (!alertMsg) document.form1.city.focus();
		alertMsg += "City\n";
	}
	if (document.form1.state.options[document.form1.state.selectedIndex].value == "") {
		if (!alertMsg) document.form1.state.focus();
		alertMsg += "State\n";
	}
	if (document.form1.zip.value == "") {
		if (!alertMsg) document.form1.zip.focus();
		alertMsg += "Zip\n";
	}
	if (document.form1.email.value == "") {
		if (!alertMsg) document.form1.email.focus();
		alertMsg += "Email\n";
	}
	if (document.form1.phone.value == "") {
		if (!alertMsg) document.form1.phone.focus();
		alertMsg += "Phone\n";
	}
	// end
	if (!alertMsg) {
		return true;
	}
	else{
		alert("\nWe don't have enough information to process your submission.\nPlease enter:\n\n" + alertMsg);
		return false;
	}
}


function EstimateRequestCheck() {
	alertMsg = "";
	if (document.form6.FirstName.value == "") {
		document.form6.FirstName.focus();
		alertMsg += "First Name\n";
	}
	if (document.form6.LastName.value == "") {
		if (!alertMsg) document.form6.LastName.focus();
		alertMsg += "Last Name\n";
	}
	if (document.form6.City.value == "") {
		if (!alertMsg) document.form6.City.focus();
		alertMsg += "City\n";
	}
	if (document.form6.State.value == "") {
		if (!alertMsg) document.form6.State.focus();
		alertMsg += "State\n";
	}
	if (document.form6.Zip.value == "") {
		if (!alertMsg) document.form6.Zip.focus();
		alertMsg += "Zip\n";
	}
    // document.form1.state.options[document.form1.state.selectedIndex].value
	if (document.form6.TypeOfInsulation.options[document.form6.TypeOfInsulation.selectedIndex].value == "") {
		if (!alertMsg) document.form6.TypeofInsulation.focus();
		alertMsg += "Type of Insulation\n";
	}
	if (document.form6.options[document.form6.Application.selectedIndex].value == "") {
		if (!alertMsg) document.form6.TypeOfInsulation.focus();
		alertMsg += "Application\n";
	}
	if (document.form6.CommentsNotes.value == "") {
		if (!alertMsg) document.form6.CommentsNotes.focus();
		alertMsg += "Comments\n";
	}
	if (document.form6.Email.value == "") {
		if (!alertMsg) document.form6.Email.focus();
		alertMsg += "Email\n";
	}
	// end
	if (!alertMsg) {
		return true;
	}
	else{
		alert("\nWe don't have enough information to process your request.\nPlease enter:\n\n" + alertMsg);
		return false;
	}

}
function VideoInquiryCheck() {
	alertMsg = "";
	if (document.form6.FirstName.value == "") {
		document.form6.FirstName.focus();
		alertMsg += "First Name\n";
	}
	if (document.form6.LastName.value == "") {
		if (!alertMsg) document.form6.LastName.focus();
		alertMsg += "Last Name\n";
	}
	if (document.form6.Email.value == "") {
		if (!alertMsg) document.form6.Email.focus();
		alertMsg += "Email\n";
	}
	if (document.form6.Address.value == "") {
		if (!alertMsg) document.form6.Adress.focus();
		alertMsg += "City\n";
	}
	if (document.form6.City.value == "") {
		if (!alertMsg) document.form6.City.focus();
		alertMsg += "City\n";
	}
	if (document.form6.State.value == "") {
		if (!alertMsg) document.form6.State.focus();
		alertMsg += "State\n";
	}
	if (document.form6.Zip.value == "") {
		if (!alertMsg) document.form6.Zip.focus();
		alertMsg += "Zip\n";
	}
	if (document.form6.Phone.value == "") {
		if (!alertMsg) document.form6.Phone.focus();
		alertMsg += "Phone\n";
	}
	if (document.form6.ProductOrService.value == "") {
		if (!alertMsg) document.form6.ProductOrService.focus();
		alertMsg += "Product or Service\n";
	}
	if (document.form6.HaveCommercial.value == "") {
		if (!alertMsg) document.form6.HaveCommercial.focus();
		alertMsg += "Have Commercial?\n";
	}
	if (document.form6.HaveAdTV.value == "") {
		if (!alertMsg) document.form6.HaveAdTV.focus();
		alertMsg += "Have Advertised TV\n";
	}
	if (document.form6.CampaignBudget.value == "") {
		if (!alertMsg) document.form6.CampaignBudget.focus();
		alertMsg += "Campaign Budget\n";
	}
	if (document.form6.CommentsNotes.value == "") {
		if (!alertMsg) document.form6.CommentsNotes.focus();
		alertMsg += "Comments\n";
	}
	// end
	if (!alertMsg) {
		return true;
	}
	else{
		alert("\nWe don't have enough information to process your request.\nPlease enter:\n\n" + alertMsg);
		return false;
	}

}

function WebDesignCheck() {
	alertMsg = "";
	if (document.form6.name.value == "") {
		document.form6.name.focus();
		alertMsg += "First Name\n";
	}
	if (document.form6.field[4].value == "") {
		if (!alertMsg) document.form6.field[4].focus();
		alertMsg += "Last Name\n";
	}
	if (document.form6.email.value == "") {
		if (!alertMsg) document.form6.email.focus();
		alertMsg += "Email\n";
	}
	if (document.form6.field[1].value == "") {
		if (!alertMsg) document.form6.field[1].focus();
		alertMsg += "Phone\n";
	}
	if (document.form6.field[2].value == "") {
		if (!alertMsg) document.form6.field[2].focus();
		alertMsg += "Project Description\n";
	}
	if (document.form6.field[16].value == "") {
		if (!alertMsg) document.form6.field[16].focus();
		alertMsg += "Products and Services\n";
	}
	// end
	if (!alertMsg) {
		return true;
	}
	else{
		alert("\nWe don't have enough information to process your request.\nPlease enter:\n\n" + alertMsg);
		return false;
	}

}

function govincentCheck() {
	alertMsg = "";
	if (document.form6.first_name.value == "") {
		document.form6.first_name.focus();
		alertMsg += "First Name\n";
	}
	if (document.form6.last_name.value == "") {
		if (!alertMsg) document.form6.last_name.focus();
		alertMsg += "Last Name\n";
	}
	if (document.form6.email.value == "") {
		if (!alertMsg) document.form6.email.focus();
		alertMsg += "Email\n";
	}
	if (document.form6.city.value == "") {
		if (!alertMsg) document.form6.city.focus();
		alertMsg += "City\n";
	}
	if (document.form6.state.value == "") {
		if (!alertMsg) document.form6.state.focus();
		alertMsg += "State\n";
	}
	if (document.form6.zip.value == "") {
		if (!alertMsg) document.form6.zip.focus();
		alertMsg += "Zip\n";
	}
	if (document.form6.CommentsNotes.value == "") {
		if (!alertMsg) document.form6.CommentsNotes.focus();
		alertMsg += "Comments\n";
	}
	// end
	if (!alertMsg) {
		return true;
	}
	else{
		alert("\nWe don't have enough information to process your request.\nPlease enter:\n\n" + alertMsg);
		return false;
	}

}
function startBusinessCheck() {
	alertMsg = "";
	if (document.form6.Name.value == "") {
		document.form6.Name.focus();
		alertMsg += "Name\n";
	}
	if (document.form6.Email.value == "") {
		if (!alertMsg) document.form6.Email.focus();
		alertMsg += "Email\n";
	}
	if (document.form6.Zip.value == "") {
		if (!alertMsg) document.form6.Zip.focus();
		alertMsg += "Zip\n";
	}
	if (document.form6.CommentsNotes.value == "") {
		if (!alertMsg) document.form6.CommentsNotes.focus();
		alertMsg += "Comments\n";
	}
	// end
	if (!alertMsg) {
		return true;
	}
	else{
		alert("\nWe don't have enough information to process your request.\nPlease enter:\n\n" + alertMsg);
		return false;
	}
}
function contactCheck() {
	alertMsg = "";
	if (document.form6.Name.value == "") {
		document.form6.Name.focus();
		alertMsg += "Name\n";
	}
	if (document.form6.Email.value == "") {
		if (!alertMsg) document.form6.Email.focus();
		alertMsg += "Email\n";
	}
	if (document.form6.Zip.value == "") {
		if (!alertMsg) document.form6.Zip.focus();
		alertMsg += "Zip\n";
	}
	// end
	if (!alertMsg) {
		return true;
	}
	else{
		alert("\nWe don't have enough information to process your request.\nPlease enter:\n\n" + alertMsg);
		return false;
	}

}
function doImage(obj,maxWidth,maxHeight){
    sourceId = obj.id;
    sourceName = obj.name;
    sourceValue = obj.value;
    var field=document.getElementById(sourceId);
	var img = new Image();
	var myTemp;
    img.src = sourceValue;

    var x=parseInt(img.width);
    var y=parseInt(img.height);
    if (x>parseInt(maxWidth)) {
        alert ("Your image width is " + x + ".  The width must not exceed "+ maxWidth +".");
        return false;
    }
    if (y>maxHeight) {
        alert ("Your image height is " + y + ".  The height must not exceed "+ maxHeight +".");
        return false;
    }
}
function showFields()
{
	if(document.form.selListing.value == '1')
	{
		document.getElementById('4').style.display='none';
		document.getElementById('8').style.display='none';
		document.getElementById('5').style.display='none';
		document.getElementById('9').style.display='none';
		document.getElementById('image1').style.display='none';
		document.getElementById('image2').style.display='none';
		document.getElementById('10').style.display='none';
	}
	else if(document.form.selListing.value == '2')
	{
		document.getElementById('4').style.display='';
		document.getElementById('8').style.display='none';
		document.getElementById('9').style.display='none';
		document.getElementById('5').style.display='none';
		document.getElementById('10').style.display='none';
	}
	else if(document.form.selListing.value == '3')
	{
		document.getElementById('8').style.display='';
		document.getElementById('9').style.display='';
		document.getElementById('10').style.display='';
		document.getElementById('4').style.display='';
		document.getElementById('5').style.display='';
	}
	else if(document.form.selListing.value == '4')
	{
		document.getElementById('4').style.display='none';
		document.getElementById('8').style.display='none';
		document.getElementById('9').style.display='none';
		document.getElementById('10').style.display='none';
		document.getElementById('5').style.display='none';
	}	
	else
	{
		document.getElementById('4').style.display='none';
	}
}
function showState()
{
		if(document.form2.selType.value == "STATE")
		{
			if(document.getElementById('state12').style.display == "none"){
				document.getElementById('state12').style.display='';
			}
		}
		else
		{
			document.getElementById('state12').style.display='none';
		}
}
function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(d.getElementById) if(d.getElementById(n)) x=d.getElementById(n); return x;
}
function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;

  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}
function preview() {
	var filenm = document.form1.logoId.value;
	var img = new Image();
	var  myTemp;
	img.src = filenm;
	myTemp = document.getElementById("logoId").value;
   	document.getElementById("innerLogo").innerHTML = "<img name='logo' src='"+filenm+"' width='160' height='68'>";
}	
function previewImg1() {
	var filenm = document.form1.img1Id.value;
	var img = new Image();
	var  myTemp;
	img.src = filenm;
	myTemp = document.getElementById("img1Id").value;
   	document.getElementById("innerImg1").innerHTML = "<img name='img1' src='"+filenm+"' >";
}	
function preview2() {
	var filenm = document.form1.img2Id.value;
	var img = new Image();
	var  myTemp;
	img.src = filenm;
	myTemp = document.getElementById("img2Id").value;
   	document.getElementById("innerImg2").innerHTML = "<img name='img2' src='"+filenm+"' >";
}	

function cTemp1(anchorname){
    var win = new PopupWindow('choose1');
    win.offsetX = -225;
    win.offsetY = -275;
    win.showPopup(anchorname);
}
function cTemp2(anchorname){
    var win = new PopupWindow('choose2');
    win.offsetX = -225;
    win.offsetY = -475;
    win.showPopup(anchorname);
}
// -->


