/////topmenu



//Contents for menu 1
var menu1=new Array()
menu1[0]='<a href="../../about_mls_pin.html">About MLS PIN</a>'
menu1[1]='<a href="../../rules_regs.html">Rules & Regs</a>'
menu1[2]='<a href="../../board_directors.html">Board of Directors</a>'
menu1[3]='<a href="../../management_team.html">Management Team</a>'
menu1[4]='<a href="../../map.html">New England Map</a>'
menu1[5]='<a href="../../become_stockholder.html">Become a Stockholder</a>'
menu1[6]='<a href="../../charitable_giving.html">Charitable Giving</a>'
menu1[7]='<a href="../../company_snapshot.html">company snapshot</a>'

var menu2=new Array()
menu2[0]='<a href="../../join_now.html">Join Now</a>'
menu2[1]='<a href="../../join_benifits.html">Benefits</a>'
menu2[2]='<a href="../../join_fees.html">Fees</a>'
menu2[3]='<a href="../../join_your_questions.html">Your Questions</a>'
menu2[4]='<a href="../../join_sales_team.html">Sales Team</a>'
menu2[5]='<a href="../../join_welcome_newoffice.html">Welcome New Offices</a>'

var menu3=new Array()
menu3[0]='<a href="../../account_reps.html">Account Reps</a>'
menu3[1]='<a href="../../course_descriptions.html">Course Descriptions</a>'
menu3[2]='<a href="../../schedule_registration.aspx">Schedule & Registration</a>'
menu3[3]='<a href="../../training_facilities.html">Training Facilities</a>'
menu3[4]='<a href="../../manuals.html">Manuals</a>'
menu3[5]='<a href="../../survey.html">Survey</a>'
menu3[6]='<a href="../../technical_tips.html">Technical Tips</a>'

var menu4=new Array()
menu4[0]='<a href="../../h3mls.html">H3MLS</a>'
menu4[1]='<a href="../../public_records.html">Public Records</a>'
menu4[2]='<a href="../../listing_transfers.html">3rd Party Listing Transfers</a>'
menu4[3]='<a href="../../lockbox_system.html">GE/Supra Lockbox System</a>'
menu4[4]='<a href="../../wyldfyre_listings.html">WyldFyre Listings</a>'
menu4[5]='<a href="../../forms_flyers.html">Forms & Flyers</a>'
menu4[6]='<a href="../../marketing_partners.html">Marketing Partners</a>'

var menu5=new Array()
menu5[0]='<a href="../../news.html">Current News</a>'
menu5[1]='<a href="../../subscriber_updates.html">CEO Subscriber Updates</a>'
menu5[2]='<a href="../../industry_news.aspx"">Industry News</a>'
menu5[3]='<a href="../../economic_market_watch.html">Economic Market Watch</a>'
menu5[4]='<a href="../../market_statistics.aspx">Market Statistics</a>'

var menu6=new Array()
menu6[0]='<a href="../../contact_us.html">Contact Us</a>'
menu6[1]='<a href="../../directions.html">Directions</a>'
menu6[2]='<a href="../../privacy_policy.html">Privacy Policy</a>'
menu6[3]='<a href="../../employment.html">Employment</a>'
menu6[4]='<a href="../../upcoming_events.html">Upcoming Events</a>'


var menuwidth='180px' //default menu width
var menubgcolor='white'  //menu bgcolor
var disappeardelay=250  //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick="yes" //hide menu when user clicks within menu?

/////No further editting needed

var ie4=document.all
var ns6=document.getElementById&&!document.all

if (ie4||ns6)
document.write('<div id="dropmenudiv" style="filter:alpha(opacity=100);-moz-opacity:.90;opacity:.90;visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')

function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}


function showhide(obj, e, visible, hidden, menuwidth){
if (ie4||ns6)
dropmenuobj.style.left=dropmenuobj.style.top="-500px"
if (menuwidth!=""){
dropmenuobj.widthobj=dropmenuobj.style
dropmenuobj.widthobj.width=menuwidth
}
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
obj.visibility=visible
else if (e.type=="click")
obj.visibility=hidden
}

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function clearbrowseredge(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge"){
var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
}
else{
var topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffset
var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move up?
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either?
edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge
}
}
return edgeoffset
}

function populatemenu(what){
if (ie4||ns6)
dropmenuobj.innerHTML=what.join("")
}


function dropdownmenu(obj, e, menucontents, menuwidth){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidemenu()
dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
populatemenu(menucontents)

if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)
dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
}

return clickreturnvalue()
}

function clickreturnvalue(){
if (ie4||ns6) return false
else return true
}

function contains_ns6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function dynamichide(e){
if (ie4&&!dropmenuobj.contains(e.toElement))
delayhidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhidemenu()
}

function hidemenu(e){
if (typeof dropmenuobj!="undefined"){
if (ie4||ns6)
dropmenuobj.style.visibility="hidden"
}
}

function delayhidemenu(){
if (ie4||ns6)
delayhide=setTimeout("hidemenu()",disappeardelay)
}

function clearhidemenu(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}

if (hidemenu_onclick=="yes")
document.onclick=hidemenu



/***********************************************
* IFrame SSI script II- © Dynamic Drive DHTML code library (http://www.dynamicdrive.com)
* Visit DynamicDrive.com for hundreds of original DHTML scripts
* This notice must stay intact for legal use
***********************************************/

//Input the IDs of the IFRAMES you wish to dynamically resize to match its content height:
//Separate each ID with a comma. Examples: ["myframe1", "myframe2"] or ["myframe"] or [] for none:
var iframeids=["myframe"]

//Should script hide iframe from browsers that don't support this script (non IE5+/NS6+ browsers. Recommended):
var iframehide="yes"

var getFFVersion=navigator.userAgent.substring(navigator.userAgent.indexOf("Firefox")).split("/")[1]
var FFextraHeight=parseFloat(getFFVersion)>=0.1? 16 : 0 //extra height in px to add to iframe in FireFox 1.0+ browsers

function resizeCaller() {
var dyniframe=new Array()
for (i=0; i<iframeids.length; i++){
if (document.getElementById)
resizeIframe(iframeids[i])
//reveal iframe for lower end browsers? (see var above):
if ((document.all || document.getElementById) && iframehide=="no"){
var tempobj=document.all? document.all[iframeids[i]] : document.getElementById(iframeids[i])
tempobj.style.display="block"
}
}
}

function resizeIframe(frameid){
var currentfr=document.getElementById(frameid)
if (currentfr && !window.opera){
currentfr.style.display="block"
if (currentfr.contentDocument && currentfr.contentDocument.body.offsetHeight) //ns6 syntax
currentfr.height = currentfr.contentDocument.body.offsetHeight+FFextraHeight; 
else if (currentfr.Document && currentfr.Document.body.scrollHeight) //ie5+ syntax
currentfr.height = currentfr.Document.body.scrollHeight;
if (currentfr.addEventListener)
currentfr.addEventListener("load", readjustIframe, false)
else if (currentfr.attachEvent){
currentfr.detachEvent("onload", readjustIframe) // Bug fix line
currentfr.attachEvent("onload", readjustIframe)
}
}
}

function readjustIframe(loadevt) {
var crossevt=(window.event)? event : loadevt
var iframeroot=(crossevt.currentTarget)? crossevt.currentTarget : crossevt.srcElement
if (iframeroot)
resizeIframe(iframeroot.id);
}

function loadintoIframe(iframeid, url){
if (document.getElementById)
document.getElementById(iframeid).src=url
}

if (window.addEventListener)
window.addEventListener("load", resizeCaller, false)
else if (window.attachEvent)
window.attachEvent("onload", resizeCaller)
else
window.onload=resizeCaller

function MM_goToURL() { //v3.0
var x=document.getElementsByName("chk");
  

	  var i, args=MM_goToURL.arguments; 
	  //document.MM_returnValue = false;
	 
	  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
	  
	  for(j=0;j<x.length;j++)
	  {
	  	if(j!=args[2])
	  	{
	  		x[j].checked=false;
	  	}
	  }
	}
	
	function MM_jumpMenu(targ,selObj,restore){ //v3.0
	  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
	  if (restore) selObj.selectedIndex=0;
	}
function KeyDownHandler(btn)
{
	if (event.keyCode == 13)//IE
	{
		event.returnValue=false;
		event.cancel = true;
		onClick();
	}
}


// -- functions for "remember me" cookies
function createCookie(name,value,days) {
	if (days) {
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
}

function readCookie(name) {
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}

function eraseCookie(name) {
	createCookie(name,"",-1);
}

function setLoginInfo() {
//reads cookies for saved login and sets the textbox accordingly

	//read cookie for "remember me" login
	var cookieUser = readCookie("mlspinlogin");
	var cookiePass = readCookie("mlspinpass");
	var cookieRememberMe = readCookie("mlspinremember");
	//alert(document.cookie);
	//alert("testing cookie:" + myCookie);
	if(cookieRememberMe!=null && cookieRememberMe=="true")
	{
		var usrBox = document.getElementById('txtUser');
		var passBox = document.getElementById('txtPwd');
		var rememberBox = document.getElementById('remember');		

		//set username textbox
		if(usrBox == null)
		{
			//alert('txtUser is null');	
		}
		else
		{
			usrBox.value = cookieUser;
		}

		//set pwd textbox
		if(passBox == null)
		{
			//alert('txtPwd is null');	
		}
		else
		{
			passBox.value = cookiePass;
		}
		
		//should the remember me checkbox be checked?
		if(rememberBox == null)
		{
			//alert('txtPwd is null');	
		}
		else
		{
			rememberBox.checked = true;
		}

	}//setting form
}

function rememberMeUpdate()
{
	var usrBox = document.getElementById('txtUser');
	var passBox = document.getElementById('txtPwd');
	var rememberBox = document.getElementById('remember');	
		
	//if box gets unchecked, we need to "forget" stored info & clear the text boxes
	if (rememberBox != null && rememberBox.checked != true)
	{
		//clear usr
		if (usrBox != null) usrBox.value="";
		eraseCookie('mlspinlogin');					
		
		//clear pwd
		if (passBox != null) passBox.value="";
		eraseCookie('mlspinpass');							
		
		//make sure remember me cookie is cleared out
		eraseCookie('mlspinremember');		
	}
}