
<!--
function show( id ) {
	document.getElementById(id).style.display = 'block'; 
}
		
function hide( id ) {
	document.getElementById(id).style.display = 'none'; 
}

function email(name,domain,tld)
{
 			var at = "@";
			var addy = domain;
			var dot = "."
			var com = tld
			location.href='mailto:'+name+at+addy+dot+com;
}

function getObj(name) {
	if (document.getElementById) {
		return document.getElementById(name);
	} else if (document.all) {
		return document.all[name];
	} else {
	return document.layers[name];
	}
}

function closeAll(number) {
		var div;
 		for (var i=1; i<number; i++)
    {
				div=getObj('q' + i);
				div.style.display = "none";
    }
}

function toggle2(that, finalNum) {
//closeAll(854);
//  preCloseAll();
  var number = finalNum.width;
	closeAll(number);
	if (that.style.display == "none") {
		that.style.display = "inline";
	} else {
		that.style.display = "none";
	}
}

function switchSpots(i) {
closeAll(42);
div=getObj('q' + i);
div.style.display = "inline";
}

var pwnd='';
function LargerImage(theURL, popW, popH, scroll) {
	var winleft = (screen.width - popW) / 2; 
	var winUp = (screen.height - popH) / 2; 
	winProp = 'width='+popW+',height='+popH+',left='+winleft+',top='+winUp+',scrollbars='+scroll+',resizable'  
	pwnd=launchWindow(pwnd,theURL,1,winProp);
}

function closeIt() {
	window.close();
}


function findState(){
location.hash = document.states.state.value;
}

//variables for javascript email to a friend script:
var sSubject = 'Interesting Web Page on ' + location.host;
var sBody    = 'Hello,\n\nI was just on the ' + location.host + ' site and noticed some content that may interest you.\n\nClick on this link to take a look: ' + location.href;
var sDisplay = '<span class="txt_10">EMAIL THIS PAGE</span>';

function trim(inputString) {
   // Removes leading and trailing spaces from the passed string. Also removes
   // consecutive spaces and replaces it with one space. If something besides
   // a string is passed in (null, custom object, etc.) then return the input.
   if (typeof inputString != "string") { return inputString; }
   var retValue = inputString;
   var ch = retValue.substring(0, 1);
   while (ch == " ") { // Check for spaces at the beginning of the string
      retValue = retValue.substring(1, retValue.length);
      ch = retValue.substring(0, 1);
   }
   ch = retValue.substring(retValue.length-1, retValue.length);
   while (ch == " ") { // Check for spaces at the end of the string
      retValue = retValue.substring(0, retValue.length-1);
      ch = retValue.substring(retValue.length-1, retValue.length);
   }
   while (retValue.indexOf("  ") != -1) { // Note that there are two spaces in the string - look for multiple spaces within the string
      retValue = retValue.substring(0, retValue.indexOf("  ")) + retValue.substring(retValue.indexOf("  ")+1, retValue.length); // Again, there are two spaces in each of the strings
   }
   return retValue; // Return the trimmed string back to the user
} // Ends the "trim" function

function hideShowBroker(theRadio) {
	with (document.getElementById("brokerLicenseRow").style) {
		if (theRadio.value == 1) {
			display = "none";
		} else {
			display = "";
		}
	}
	with (document.getElementById("BrokerTitle").style) {
		if (theRadio.value == 1) {
			display = "none";
		} else {
			display = "";
		}
	}
	with (document.getElementById("SellerTitle").style) {
		if (theRadio.value == 2) {
			display = "none";
		} else {
			display = "";
		}
	}
	with (document.getElementById("BrokerBlock1").style) {
		if (theRadio.value == 1) {
			display = "none";
		} else {
			display = "";
		}
	}
	with (document.getElementById("BrokerBlock2").style) {
		if (theRadio.value == 1) {
			display = "none";
		} else {
			display = "";
		}
	}
	with (document.getElementById("BrokerFirstName").style) {
		if (theRadio.value == 1) {
			display = "none";
		} else {
			display = "";
		}
	}
	with (document.getElementById("BrokerLastName").style) {
		if (theRadio.value == 1) {
			display = "none";
		} else {
			display = "";
		}
	}
	with (document.getElementById("SellerStreet").style) {
		if (theRadio.value == 1) {
			display = "";
		} else {
			display = "none";
		}
	}
	with (document.getElementById("BrokerStreet").style) {
		if (theRadio.value == 1) {
			display = "none";
		} else {
			display = "";
		}
	}
}

	//handles create account check
	function CopyField(Source,Destination) {
		BackupField(Destination);
		Destination.value=Source.value;
	}

	function BackupField(Field) {
		Field.OldValue=Field.value;
	}

	function CopyFieldOnly(Source,Destination) {
		Destination.value=Source.value;
	}

	function RestoreField(Destination) {
		Destination.value=Destination.OldValue;
	}
	
	function ShipSameAsBillClick() {
		if(document.frmAccount.same_info.checked) {
			CopyField( document.frmAccount.Bill_First   , document.frmAccount.Ship_First    );
			CopyField( document.frmAccount.Bill_Last    , document.frmAccount.Ship_Last     );
			CopyField( document.frmAccount.Bill_Company , document.frmAccount.Ship_Company  );
			CopyField( document.frmAccount.Bill_Phone1  , document.frmAccount.Ship_Phone1   );
			CopyField( document.frmAccount.Bill_Address1, document.frmAccount.Ship_Address1 );
			CopyField( document.frmAccount.Bill_Address2, document.frmAccount.Ship_Address2 );
			CopyField( document.frmAccount.Bill_City    , document.frmAccount.Ship_City     );
			CopyField( document.frmAccount.Bill_State   , document.frmAccount.Ship_State    );
			CopyField( document.frmAccount.Bill_Zip     , document.frmAccount.Ship_Zip      );
			CopyField( document.frmAccount.Bill_Country , document.frmAccount.Ship_Country  );
		} else {
			RestoreField(document.frmAccount.Ship_First    );
			RestoreField(document.frmAccount.Ship_Last     );
			RestoreField(document.frmAccount.Ship_Company  );
			RestoreField(document.frmAccount.Ship_Phone1   );
			RestoreField(document.frmAccount.Ship_Address1 );
			RestoreField(document.frmAccount.Ship_Address2 );
			RestoreField(document.frmAccount.Ship_City     );
			RestoreField(document.frmAccount.Ship_State    );
			RestoreField(document.frmAccount.Ship_Zip      );
			RestoreField(document.frmAccount.Ship_Country  );
		}
	}


//-->