// This file includes all the objects(functions) needed for the website functionality



// -------------------------------------------------------------------------------------------------------------------------------------------


// Functions used for the leadpile design


function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  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 MM_findObj(n, d) { //v4.01
  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(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function showOne(id) {
	for (i = 1; i <= 18; i++) {
		document.getElementById("ans" + i).style.display = (id == i ? "block" : "none");
	}
}

// setPage() will use the variable(s) passed in the () to change the content of the elements in the html page; it returns false to prevent the html attempt to change the location when the function is called from an anchor.

function seller_inquiry() {
	document.contact_form.message.value='Company: '+contact_form.company.value+"\n"+'Website: '+contact_form.website.value+"\n"+'Name: '+contact_form.sender_name.value+"\n"+'Email: '+contact_form.sender_email.value+"\n"+'Address: '+contact_form.address.value+"\n"+'City: '+contact_form.city.value+"\n"+'State: '+contact_form.state.value+"\n"+'ZIP: '+contact_form.zip.value+"\n"+'Phone: '+contact_form.phone1.value+'-'+contact_form.phone2.value+'-'+contact_form.phone3.value+"\n"+"\n"+'What type of leads do you specialize in?'+"\n"+contact_form.nr1.value+"\n"+"\n"+'How many leads per day do you currently produce that can be placed in the Leadpile System?'+"\n"+contact_form.nr2.value+"\n"+"\n"+'Are you currently selling leads?'+"\n"+contact_form.nr3.value+"\n"+"\n"+'Is your business model 100% selling leads?'+"\n"+contact_form.nr4.value+"\n"+"\n"+'What price point are currently selling your leads at?'+"\n"+contact_form.nr5.value+"\n"+"\n"+'Comments:'+"\n"+contact_form.comments.value+"\n"+"\n"+'Site: '+contact_form.site.value+"\n"+"\n";
}


function setPage( element1, content1, element2, content2, element3, content3, element4, content4, element5, content5 ) {



	if (( content1 ) && ( element1 )) document.getElementById(element1).innerHTML = content1;

	if (( content2 ) && ( element2 )) document.getElementById(element2).innerHTML = content2;

	if (( content3 ) && ( element3 )) document.getElementById(element3).innerHTML = content3;

	if (( content4 ) && ( element4 )) document.getElementById(element4).innerHTML = content4;

	if (( content5 ) && ( element5 )) document.getElementById(element5).innerHTML = content5;



	return false;

}



// -------------------------------------------------------------------------------------------------------------------------------------------




