function hello() {
	alert("hello");
}

function onlineCoursesStateClicked() {
	var load360 = window.open("http://midstateschool.360training.com/", "_self");	
}

var identity;
var req;

window.onload = function() {
//function onLoadHandler() {
windowLoaded();
	// check for cookie and if so log in
	if(readCookie('username') != null && readCookie('password') != null)
	{
		doLogin(readCookie('username'), readCookie('password'));
	}
}

//xmlhttp request
function doLogin(u, p) {
	if(u == "" || p == "") {
		alert("Incorrect username/password. Please try again.");
		return;
	}
	
    var url = "svc/login.php";
    req = false;
    // branch for native XMLHttpRequest object
    if(window.XMLHttpRequest && !(window.ActiveXObject)) {
    	try {
			req = new XMLHttpRequest();
        } catch(e) {
			req = false;
        }
    // branch for IE/Windows ActiveX version
    } else if(window.ActiveXObject) {
       	try {
        	req = new ActiveXObject("Msxml2.XMLHTTP");
      	} catch(e) {
        	try {
          		req = new ActiveXObject("Microsoft.XMLHTTP");
        	} catch(e) {
          		req = false;
        	}
		}
    }
	if(req) {
        var params = "u=" + u + "&" + "p=" + p;
        
		req.open("POST", url, true);
		req.onreadystatechange = loginReqHandler;
		
		req.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
		req.setRequestHeader("Content-length", params.length);
		req.setRequestHeader("Connection", "close");
		
		req.send(params);
	}
    else{
    	//you need to do a normal form submission
    }
}

function loginReqHandler() {
    // only if req shows "loaded"
    
    if (req.readyState == 4) {
        // only if "OK"
        if (req.status == 200) {
          if(req.responseText == "FAIL") {
          	alert("Incorrect username/password. Please try again.");
          } else {
          
          	var resArray = req.responseText.split(','); 
          	document.getElementById("loginArea").innerHTML = "<BR /><BR />Logged in as: <a id=\"activity-link\" href=\"\" >"+resArray[1]+"<\/a>&nbsp;&nbsp;<input type=\"button\" value=\"logout\" onClick=\"doLogout()\" />";
          	createCookie("username", resArray[1], 1);
          	createCookie("insuraneLicense", resArray[2], 1);
          	createCookie("ssn", resArray[3], 1);
          	createCookie("password", resArray[4], 1);
          	
          	if(resArray[2] != "") identity = resArray[2];
          	else if(resArray[3] != "") identity = resArray[3];
			isLoggedIn = true;
          	
          	var mainContent = document.getElementById('main-content');
          	var activityLink = document.getElementById('activity-link');
          	activityLink.onclick = function() {
          		mainContent.innerHTML = "ACTIVITY";
          		return false;
          	}
			
          }
        } else {
            alert("There was an error logging you in... please try again later.");
        }
    }
    
}

function doLogout() {
	eraseCookie('username');
	eraseCookie('insuranceLicense');
	eraseCookie('ssn');
	eraseCookie('password');
	
	identity = "";
	isLoggedIn = false;
	
	document.getElementById("loginArea").innerHTML = "<form action=\"svc/login.php\" method=\"POST\"><div style=\"float:right\">username: <input name=\"usernameLogin\" id=\"usernameLogin\" type=\"text\" size=\"20\" \/><\/div><BR \/><div  style=\"float:right\">password: <input name=\"passwordLogin\" id=\"passwordLogin\" type=\"password\" size=\"20\" /><\/div><BR \/><input name=\"submit\" type=\"button\" style=\"float:right\" value=\"Login\" onClick=\"doLogin(usernameLogin.value, passwordLogin.value)\" \/><\/form>";
}

// registration
function doRegister() {
	//validate
	var validateMsg = "Please correct the following fields:\n";
	var isValid = true;
	
	if(document.getElementById('firstname').value == "") {
		validateMsg += "\n'firstname'";
		isValid = false;
	}
	if(document.getElementById('lastname').value == "") {
		validateMsg += "\n'lastname'";
		isValid = false;
	}
	if(document.getElementById('street').value == "") {
		validateMsg += "\n'street'";
		isValid = false;
	}
	if(document.getElementById('city').value == "") {
		validateMsg += "\n'city'";
		isValid = false;
	}
	if(document.getElementById('state').value == "") {
		validateMsg += "\n'state'";
		isValid = false;
	}
	if(document.getElementById('zip').value == "") {
		validateMsg += "\n'zip'";
		isValid = false;
	}
	if(document.getElementById('phone').value == "") {
		validateMsg += "\n'phone'";
		isValid = false;
	}
	if(document.getElementById('fax').value == "") {
		validateMsg += "\n'fax'";
		isValid = false;
	}
	if(document.getElementById('email').value == "") {
		validateMsg += "\n'email'";
		isValid = false;
	}
	if(document.getElementById('insurancelicense').value == "") {
	
		if(document.getElementById('ssn').value == "") {
			validateMsg += "\n'insurance license OR ssn'";
			isValid = false;
		}
	}
	if(document.getElementById('username').value == "") {
		validateMsg += "\n'username'";
		isValid = false;
	}
	if(document.getElementById('password').value == "") {
		validateMsg += "\n'password'";
		isValid = false;
	}
	
	if(isValid) {
		var url = "svc/register.php";
    	req = false;
    	// branch for native XMLHttpRequest object
    	if(window.XMLHttpRequest && !(window.ActiveXObject)) {
    		try {
				req = new XMLHttpRequest();
    	    } catch(e) {
				req = false;
   	    	}
    	// branch for IE/Windows ActiveX version
    	} else if(window.ActiveXObject) {
       		try {
        		req = new ActiveXObject("Msxml2.XMLHTTP");
      		} catch(e) {
        		try {
          			req = new ActiveXObject("Microsoft.XMLHTTP");
        		} catch(e) {
          			req = false;
        		}
			}
    	}
    	
		if(req) {
    	    var params = "firstname=" + 	document.getElementById('firstname').value;
        	params += "&" + "lastname=" + document.getElementById('lastname').value;
        	params += "&" + "street=" + document.getElementById('street').value;
        	params += "&" + "city=" + document.getElementById('city').value;
        	params += "&" + "state=" + document.getElementById('state').value;
        	params += "&" + "zip=" + document.getElementById('zip').value;
        	params += "&" + "phone=" + document.getElementById('phone').value;
        	params += "&" + "fax=" + document.getElementById('fax').value;
        	params += "&" + "email=" + document.getElementById('email').value;
        	params += "&" + "insuranceLicense=" + document.getElementById('insurancelicense').value;
        	params += "&" + "ssn=" + document.getElementById('ssn').value;
        	params += "&" + "username=" + document.getElementById('username').value;
        	params += "&" + "password=" + document.getElementById('password').value;
        
			req.open("POST", url, true);
			req.onreadystatechange = registerReqHandler;
			
			req.setRequestHeader("Content-type", "application/x-www-form-urlencoded");	
			req.setRequestHeader("Content-length", params.length);
			req.setRequestHeader("Connection", "close");
		
			req.send(params);
		}
    	else{
    		//you need to do a normal form submission
    	}
    } else {
    	alert(validateMsg);
    }
}

function registerReqHandler() {
    // only if req shows "loaded"
    if (req.readyState == 4) {
        // only if "OK"
        if (req.status == 200) {
          if(req.responseText == "FAIL") {
          	alert("There was an error registering you... please try again.");
          } else if(req.responseText == "SUCCESS") {
          	// store cookie and log user in
          	var resArray = req.responseText.split(',');
          	createCookie("username", resArray[1], 1);
          	createCookie("insuraneLicense", resArray[2], 1);
          	createCookie("ssn", resArray[3], 1);
          	createCookie("password", resArray[4], 1);
          	
          	if(resArray[2] != "") identity = resArray[2];
          	else if(resArray[3] != "") identity = resArray[3];
			isLoggedIn = true;
          	
          	// reload page?
          	loginArea.innerHTML = "<BR /><BR />Logged in as: <a id=\"activity-link\" href=\"\" >"+resArray[1]+"<\/a>&nbsp;&nbsp;<input type=\"button\" value=\"logout\" onClick=\"doLogout()\" />";
          	
          	var mainContent = document.getElementById('main-content');
          	var activityLink = document.getElementById('activity-link');
          	activityLink.onclick = function() {
          		mainContent.innerHTML = "ACTIVITY";
          		return false;
          	}
          }
        } else {
            alert("There was an error logging you in... please try again.");
        }
    }
}

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 ca = document.cookie.split(';');
  var nameEQ = name + "=";
  for(var i=0; i < ca.length; i++) {
    var c = ca[i];
    while (c.charAt(0)==' ') c = c.substring(1, c.length); //delete spaces
    if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
    }
  return null;
}

function eraseCookie(name)
{
  createCookie(name, "", -1);
}

//window.onload = function() {
function windowLoaded() {
	
	// get reference to main-content area
	var mainContent = document.getElementById('main-content');
	
	// get reference to all links to be overridden
	var homeLink = document.getElementById('home-link');
	var seminarsLink = document.getElementById('seminars-link');
	var onlineCoursesLink = document.getElementById('online-ce-courses-link');
	var registrationLink = document.getElementById('registration-link');
	var contactLink = document.getElementById('contact-link');
	
	homeLink.onclick = function() {
	
		// set main content
		mainContent.innerHTML = "<img src='assets/welcome.png' height='50' /><BR> Mid-State School is a continuing education company that has been operating for over 25 years in the Pacific Northwest. We are a proud member of The Society Of Insurance Trainers and Educators. We also sit on advisory boards for various departments of insurance when requested. Midstate is also known throughout Oregon, Washington and Idaho for going above and beyond to make sure our clients needs are fully met and that their continuing education experience is as pleasant as it is comprehensive. Our goal is to provide the proper tools needed for any individual to enter their particular field of choice and stay abreast to all aspects of their chosen profession. Midstate school provides live classroom continuing education seminars in Oregon. We also offer online continuing education classes for all states. So, no matter where you are, Midstate can accommodate your education and certification needs wether it be inside the classroom or online from your home. Our online CE classes come with 24/7 support and our seminars will keep you engaged. If you would like to receive brochures and special discounts offered, please click the contact us link and let us know. We look forward to working with you."
		
		// don't redirect
		return false;
	}
	
	seminarsLink.onclick = function() {
	
		// set main content
		mainContent.innerHTML = "<img src='assets/seminars.png' height='30' /><BR>Midstate school offers engaging and comprehensive certification seminars throughout Oregon. Our seminars offer the latest course material available in a setting where the instructor will know your name and can address any questions you might have individually. Wether you are seeking training for your staff, an agent working for an agency, or an agent working for yourself, Midstate School can meet your needs and walk you through it every step of the way.<BR /><BR />Below is a list of the live seminar courses we offer at various sites throughout the state of Oregon as well as the prices for each course.<BR /><BR /><div style=\"height:300px;overflow:scroll\"><B>Complete Comprehensive 24 Hour Certification - $320 (Full 24 Hours)<BR /><a href=\"addToCart.html?cid=5X3GGPFMB6432\"><input type=\"image\" src=\"https://www.paypal.com/en_US/i/btn/btn_cart_LG.gif\" border=\"0\" name=\"submit\" alt=\"PayPal - The safer, easier way to pay online!\" \></a><BR /><BR />2010/11 Partnership LTC Refresher - $ 80  (4 Hours)<BR /><a href=\"addToCart.html?cid=MVYX6TSVC94S2\"><input type=\"image\" src=\"https://www.paypal.com/en_US/i/btn/btn_cart_LG.gif\" border=\"0\" name=\"submit\" alt=\"PayPal - The safer, easier way to pay online!\" \></a><BR /><BR />Estate Planning Update - $ 80   (4 Hours)<BR /><a href=\"addToCart.html?cid=Y8E329VNQ83N2\"><input type=\"image\" src=\"https://www.paypal.com/en_US/i/btn/btn_cart_LG.gif\" border=\"0\" name=\"submit\" alt=\"PayPal - The safer, easier way to pay online!\" \></a><BR /><BR />Oregon Law - $ 65  (3 Hours)<BR /><a href=\"addToCart.html?cid=43W58ABAMZNFS\"><input type=\"image\" src=\"https://www.paypal.com/en_US/i/btn/btn_cart_LG.gif\" border=\"0\" name=\"submit\" alt=\"PayPal - The safer, easier way to pay online!\" \></a><BR /><BR />Ethics and the Agent - $ 65  (3 Hours)<BR /><a href=\"addToCart.html?cid=BC9RH7LJ96JKQ\"><input type=\"image\" src=\"https://www.paypal.com/en_US/i/btn/btn_cart_LG.gif\" border=\"0\" name=\"submit\" alt=\"PayPal - The safer, easier way to pay online!\" \></a><BR /><BR />Insurers and the Consumer - $ 50   (2 Hours)<BR /><a href=\"addToCart.html?cid=3LV9RVJUZ86VL\"><input type=\"image\" src=\"https://www.paypal.com/en_US/i/btn/btn_cart_LG.gif\" border=\"0\" name=\"submit\" alt=\"PayPal - The safer, easier way to pay online!\" \></a><BR /><BR />The Small Business Owners Needs - $ 80    (4 Hours)<BR /><a href=\"addToCart.html?cid=D8LSZRLGSQKEG\"><input type=\"image\" src=\"https://www.paypal.com/en_US/i/btn/btn_cart_LG.gif\" border=\"0\" name=\"submit\" alt=\"PayPal - The safer, easier way to pay online!\" \></a><BR /><BR />Impact - Auto Coverage and Adjuster Issues - $  80   (4 Hours)<BR /><a href=\"addToCart.html?cid=D8LSZRLGSQKEG\"><input type=\"image\" src=\"https://www.paypal.com/en_US/i/btn/btn_cart_LG.gif\" border=\"0\" name=\"submit\" alt=\"PayPal - The safer, easier way to pay online!\" \></a><BR /><BR />Newport Wine Festival Day 1 Law, Ethics and Wine Festival - $150 (6 Hours)<BR /><a href=\"addToCart.html?cid=QPX9HG8ECKHUN\"><input type=\"image\" src=\"https://www.paypal.com/en_US/i/btn/btn_cart_LG.gif\" border=\"0\" name=\"submit\" alt=\"PayPal - The safer, easier way to pay online!\" \></a><BR /><BR />Newport Wine Festival Day 2 What Our Clients Want Vs What They Need - $150 (6 Hours)<BR /><a href=\"addToCart.html?cid=3TSJ8ZPRGMHJL\"><input type=\"image\" src=\"https://www.paypal.com/en_US/i/btn/btn_cart_LG.gif\" border=\"0\" name=\"submit\" alt=\"PayPal - The safer, easier way to pay online!\" \></a><BR /></B></div><BR /><BR />Below is our seminar schedule. Click on any particular course for dates/locations and to register for that particular item. Alternatively, you can sync our seminar course calendar to your own calendar if you have a gmail account and all our updates will automatically update in your calendar as well. Otherwise, feel free to visit our site anytime for the latest seminar dates/locations and/or join our email list for updates directly to your inbox.<BR /><BR /><iframe src=\"http://www.google.com/calendar/embed?src=midstateschool%40gmail.com&ctz=America/Los_Angeles\" style=\"border: 0\" width=\"800\" height=\"600\" frameborder=\"0\" scrolling=\"no\"></iframe><div style=\"width:250px; height:22px; background-color:#FFFFFF; layer-background-color:#FFFFFF; z-index:300\; position:absolute; top:598px\"></div>";
	
		//don't redirect
		return false;
	}
	
	onlineCoursesLink.onclick = function() {
	
		// set main content
		mainContent.innerHTML = "<img src='assets/onlinececourses.png' height='40' /><BR>Midstate School not only offers in person seminars but we also offer complete comprehensive online and home study training programs throughout each and every state in the nation. No matter where you live or what type of certification you are looking for, we provide it. Our courses come with 24/7 customer support so you will never be left in the dark no matter the inquiry and we provide many certification and training options in a variety of user friendly formats such as textbooks, flash cards, dvd's, audio discs and more. Our goal is to help you achieve your goals and we follow through with you every step of the way. So, feel free to investigate our full catalog and get certified today!<BR /><BR /><H2>Please choose and click on your state and you will be directed you to our full catalog which certifies you for that particular state:</H2><BR /><div id=\"map-usa\" class=\"overlayDiv\" style=\"margin-left:auto; margin-right:auto;width:650px\" ><img src=\"assets/usa.gif\" onclick=\"this.blur();\" alt=\"Map of United States, United States Map\" width=\"644\" height=\"484\" border=\"0\" usemap=\"#FPMap0\" class=\"imgBase\" oncontextmenu=\"this.blur(); return false;\" /></div><map name=\"FPMap0\"><area href=\"javascript:void(0); javascript:onlineCoursesStateClicked();\" onmouseover=\"return overlib('<center><B>&nbsp;Maine&nbsp;</B></center>', FGCOLOR, '#FFCCFF');\" onmouseout=\"nd();\" shape=\"poly\" coords=\"582, 80, 593, 105, 600, 94, 613, 83, 623, 76, 622, 70, 614, 64, 606, 43, 600, 43, 595, 45, 588, 57, 590, 68, 585, 77\"/><area href=\"javascript:onlineCoursesStateClicked(); javascript:void (0);\" onmouseover=\"return overlib('<center><B>&nbsp;Vermont&nbsp;</B></center>', FGCOLOR, '#CCFFFF');\" onmouseout=\"nd();\" shape=\"poly\" coords=\"581, 82, 562, 89, 568, 120, 577, 117, 576, 107\"/><area href=\"javascript:onlineCoursesStateClicked(); javascript:void (0);\" onmouseover=\"return overlib('<center><B>&nbsp;Rhode&nbsp;Island&nbsp;</B></center>', FGCOLOR, '#CCFFFF');\" onmouseout=\"nd();\" shape=\"poly\" coords=\"586, 127, 586, 137, 587, 139, 601, 131, 591, 126\"/><area href=\"javascript:onlineCoursesStateClicked(); javascript:void (0);\" onmouseover=\"return overlib('<center><B>&nbsp;Connecticut&nbsp;</B></center>', FGCOLOR, '#FFCCFF');\" onmouseout=\"nd();\" shape=\"poly\" coords=\"569, 132, 571, 144, 587, 137, 588, 125\"/><area href=\"javascript:onlineCoursesStateClicked(); javascript:void (0);\" onmouseover=\"return overlib('<center><B>&nbsp;Massachusetts&nbsp;</B></center>', FGCOLOR, '#FFFFCC');\" onmouseout=\"nd();\" shape=\"poly\" coords=\"569, 120, 569, 131, 587, 126, 602, 131, 612, 128, 598, 121, 597, 114, 593, 116\"/><area href=\"javascript:onlineCoursesStateClicked(); javascript:void (0);\" onmouseover=\"return overlib('<center><B>&nbsp;New&nbsp;Hampshire&nbsp;</B></center>', FGCOLOR, '#CCCCFF');\" onmouseout=\"nd();\" shape=\"poly\" coords=\"584, 80, 596, 105, 596, 114, 578, 117, 578, 107\"/><area href=\"javascript:onlineCoursesStateClicked(); javascript:void (0);\" onmouseover=\"return overlib('<center><B>&nbsp;New&nbsp;Jersey&nbsp;</B></center>', FGCOLOR, '#FFFFCC');\" onmouseout=\"nd();\" shape=\"poly\" coords=\"557, 143, 557, 155, 563, 162, 556, 168, 562, 175, 568, 179, 572, 170, 572, 159, 565, 155, 569, 147\"/><area href=\"javascript:onlineCoursesStateClicked(); javascript:void (0);\" onmouseover=\"return overlib('<center><B>&nbsp;Delaware&nbsp;</B></center>', FGCOLOR, '#CCFFCC');\" onmouseout=\"nd();\" shape=\"poly\" coords=\"557, 167, 552, 172, 557, 193, 567, 188, 563, 182, 558, 171, 554, 171\"/><area href=\"javascript:onlineCoursesStateClicked(); javascript:void (0);\" onmouseover=\"return overlib('<center><B>&nbsp;Maryland&nbsp;</B></center>', FGCOLOR, '#CCCCFF');\" onmouseout=\"nd();\" shape=\"poly\" coords=\"555, 195, 545, 195, 539, 195, 542, 190, 537, 184, 529, 176, 512, 185, 509, 180, 510, 178, 554, 167, 558, 193\"/><area href=\"javascript:onlineCoursesStateClicked(); javascript:void (0);\" onmouseover=\"return overlib('<center><B>&nbsp;Virginia&nbsp;</B></center>', FGCOLOR, '#FFFFCC');\" onmouseout=\"nd();\" shape=\"poly\" coords=\"534, 183, 533, 187, 528, 184, 517, 198, 512, 199, 507, 213, 494, 221, 487, 216, 474, 232, 560, 218, 564, 197, 556, 194, 543, 196\"/><area href=\"javascript:onlineCoursesStateClicked(); javascript:void (0);\" onmouseover=\"return overlib('<center><B>&nbsp;New&nbsp;York&nbsp;</B><BR>&nbsp;Albany&nbsp;</center>', FGCOLOR, '#CCFFCC');\" onmouseout=\"nd();\" coords=\"567, 148, 566, 154, 570, 157, 593, 143, 588, 138, 572, 141, 562, 89, 541, 93, 533, 106, 534, 114, 528, 121, 515, 121, 510, 128, 508, 134, 499, 145, 550, 135, 557, 142\" shape=\"poly\"/><area href=\"javascript:onlineCoursesStateClicked(); javascript:void (0);\" onmouseover=\"return overlib('<center><B>&nbsp;West&nbsp;Virginia&nbsp;</B></center>', FGCOLOR, '#FFCCCC');\" onmouseout=\"nd();\" shape=\"poly\" coords=\"510, 179, 500, 182, 499, 171, 497, 171, 496, 183, 489, 189, 481, 201, 477, 208, 491, 217, 496, 219, 510, 212, 515, 196, 517, 196, 530, 185, 542, 188, 530, 178, 510, 183\"/><area href=\"javascript:onlineCoursesStateClicked(); javascript:void (0);\" onmouseover=\"return overlib('<center><B>&nbsp;Pennsylvania&nbsp;</B></center>', FGCOLOR, '#FFCCFF');\" onmouseout=\"nd();\" shape=\"poly\" coords=\"499, 144, 495, 149, 499, 171, 499, 180, 559, 165, 564, 160, 559, 154, 558, 142, 550, 135\"/><area href=\"javascript:onlineCoursesStateClicked(); javascript:void (0);\" onmouseover=\"return overlib('<center><B>&nbsp;North&nbsp;Carolina&nbsp;</B></center>', FGCOLOR, '#FFCCCC');\" onmouseout=\"nd();\" shape=\"poly\" coords=\"489, 230, 474, 244, 463, 257, 478, 257, 490, 250, 506, 249, 510, 252, 524, 252, 537, 262, 545, 262, 555, 249, 561, 244, 567, 226, 561, 219\"/><area href=\"javascript:onlineCoursesStateClicked(); javascript:void (0);\" onmouseover=\"return overlib('<center><B>&nbsp;South&nbsp;Carolina&nbsp;</B></center>', FGCOLOR, '#CCFFFF');\" onmouseout=\"nd();\" shape=\"poly\" coords=\"479, 258, 513, 295, 532, 276, 539, 262, 524, 251, 511, 252, 510, 248, 490, 248\"/><area href=\"javascript:onlineCoursesStateClicked(); javascript:void (0);\" onmouseover=\"return overlib('<center><B>&nbsp;Georgia&nbsp;</B></center>', FGCOLOR, '#FFFFCC');\" onmouseout=\"nd();\" shape=\"poly\" coords=\"479, 259, 463, 255, 450, 261, 462, 294, 462, 296, 462, 304, 465, 320, 502, 320, 501, 315, 508, 315, 514, 295\"/><area href=\"javascript:onlineCoursesStateClicked(); javascript:void (0);\" onmouseover=\"return overlib('<center><B>&nbsp;Florida&nbsp;</B></center>', FGCOLOR, '#FFCCCC');\" onmouseout=\"nd();\" shape=\"poly\" coords=\"431, 321, 434, 329, 454, 328, 464, 337, 473, 331, 478, 331, 495, 339, 497, 355, 503, 370, 517, 386, 528, 392, 536, 392, 539, 385, 540, 368, 524, 342, 510, 316, 502, 316, 502, 319, 470, 319, 462, 316\"/><area href=\"javascript:onlineCoursesStateClicked(); javascript:void (0);\" onmouseover=\"return overlib('<center><B>&nbsp;Tennessee&nbsp;</B></center>', FGCOLOR, '#CCFFCC');\" onmouseout=\"nd();\" shape=\"poly\" coords=\"404, 241, 492, 229, 465, 254, 450, 259, 397, 261\"/><area href=\"javascript:onlineCoursesStateClicked(); javascript:void (0);\" onmouseover=\"return overlib('<center><B>&nbsp;Kentucky&nbsp;</B></center>', FGCOLOR, '#CCCCFF');\" onmouseout=\"nd();\" shape=\"poly\" coords=\"480, 204, 462, 199, 456, 192, 440, 214, 423, 216, 421, 218, 412, 230, 403, 232, 403, 241, 475, 231, 486, 214, 479, 208\"/><area href=\"javascript:onlineCoursesStateClicked(); javascript:void (0);\" onmouseover=\"return overlib('<center><B>&nbsp;Ohio&nbsp;</B></center>', FGCOLOR, '#CCFFFF');\" onmouseout=\"nd();\" shape=\"poly\" coords=\"494, 151, 476, 158, 466, 158, 447, 158, 454, 199, 458, 193, 465, 199, 481, 201, 491, 185, 499, 180, 497, 147, 479, 157, 467, 157, 450, 158\"/><area href=\"javascript:onlineCoursesStateClicked(); javascript:void (0);\" onmouseover=\"return overlib('<center><B>&nbsp;Indiana&nbsp;</B></center>', FGCOLOR, '#FFFFCC');\" onmouseout=\"nd();\" shape=\"poly\" coords=\"447, 158, 420, 161, 421, 203, 418, 219, 439, 213, 455, 193\"/><area href=\"javascript:onlineCoursesStateClicked(); javascript:void (0);\" onmouseover=\"return overlib('<center><B>&nbsp;Alabama&nbsp;</B></center>', FGCOLOR, '#FFCCFF');\" onmouseout=\"nd();\" shape=\"poly\" coords=\"449, 260, 422, 258, 421, 313, 425, 330, 433, 330, 433, 322, 465, 314, 463, 303, 463, 293\"/><area href=\"javascript:onlineCoursesStateClicked(); javascript:void (0);\" onmouseover=\"return overlib('<center><B>&nbsp;Mississippi&nbsp;</B></center>', FGCOLOR, '#CCCCFF');\" onmouseout=\"nd();\" shape=\"poly\" coords=\"420, 261, 398, 260, 383, 282, 387, 304, 380, 322, 403, 324, 405, 331, 426, 331, 422, 297\"/><area href=\"javascript:onlineCoursesStateClicked(); javascript:void (0);\" onmouseover=\"return overlib('<center><B>&nbsp;Michigan&nbsp;</B></center>', FGCOLOR, '#CCCCFF');\" onmouseout=\"nd();\" shape=\"poly\" coords=\"426, 161, 465, 156, 465, 149, 472, 128, 465, 120, 455, 128, 453, 125, 459, 108, 443, 97, 442, 94, 452, 93, 437, 83, 416, 89, 404, 82, 409, 77, 384, 91, 410, 101, 413, 111, 426, 96, 442, 95, 442, 97, 437, 110, 433, 112, 426, 124, 431, 139\"/><area href=\"javascript:onlineCoursesStateClicked(); javascript:void (0);\" onmouseover=\"return overlib('<center><B>&nbsp;Wisconsin&nbsp;</B></center>', FGCOLOR, '#CCFFCC');\" onmouseout=\"nd();\" shape=\"poly\" coords=\"380, 90, 367, 88, 356, 109, 357, 122, 378, 136, 379, 146, 386, 153, 413, 150, 412, 134, 416, 112, 412, 107, 413, 107\"/><area href=\"javascript:onlineCoursesStateClicked(); javascript:void (0);\" onmouseover=\"return overlib('<center><B>&nbsp;Illinois&nbsp;</B></center>', FGCOLOR, '#FFCCCC');\" onmouseout=\"nd();\" shape=\"poly\" coords=\"388, 156, 387, 164, 381, 169, 375, 187, 390, 205, 390, 212, 390, 216, 401, 228, 405, 230, 414, 230, 421, 217, 423, 204, 420, 163, 413, 150\"/><area href=\"javascript:onlineCoursesStateClicked(); javascript:void (0);\" onmouseover=\"return overlib('<center><B>&nbsp;Minnesota&nbsp;</B></center>', FGCOLOR, '#CCFFFF');\" onmouseout=\"nd();\" shape=\"poly\" coords=\"388, 70, 361, 66, 355, 61, 341, 62, 333, 56, 312, 58, 317, 97, 319, 103, 318, 108, 321, 117, 320, 139, 378, 137, 361, 121, 359, 104, 369, 84\"/><area href=\"javascript:onlineCoursesStateClicked(); javascript:void (0);\" onmouseover=\"return overlib('<center><B>&nbsp;Iowa&nbsp;</B></center>', FGCOLOR, '#CCCCFF');\" onmouseout=\"nd();\" shape=\"poly\" coords=\"320, 140, 320, 157, 329, 180, 375, 182, 383, 167, 391, 153, 380, 145, 379, 139\"/><area href=\"javascript:onlineCoursesStateClicked(); javascript:void (0);\" onmouseover=\"return overlib('<center><B>&nbsp;Louisiana&nbsp;</B></center>', FGCOLOR, '#CCFFCC');\" onmouseout=\"nd();\" shape=\"poly\" coords=\"348, 295, 384, 292, 387, 301, 382, 321, 401, 323, 411, 329, 413, 335, 410, 342, 418, 349, 413, 351, 389, 353, 379, 342, 374, 345, 356, 342, 352, 342, 357, 325, 352, 309\"/><area href=\"javascript:onlineCoursesStateClicked(); javascript:void (0);\" onmouseover=\"return overlib('<center><B>&nbsp;Arkansas&nbsp;</B></center>', FGCOLOR, '#CCFFFF');\" onmouseout=\"nd();\" shape=\"poly\" coords=\"341, 244, 345, 285, 347, 285, 349, 294, 386, 293, 384, 281, 399, 258, 403, 247, 393, 248, 398, 240\"/><area href=\"javascript:onlineCoursesStateClicked(); javascript:void (0);\" onmouseover=\"return overlib('<center><B>&nbsp;Missouri&nbsp;</B></center>', FGCOLOR, '#FFFFCC');\" onmouseout=\"nd();\" shape=\"poly\" coords=\"328, 181, 337, 198, 342, 204, 342, 237, 343, 245, 401, 239, 394, 248, 402, 248, 404, 231, 391, 212, 391, 201, 377, 186, 377, 182\"/><area href=\"javascript:onlineCoursesStateClicked(); javascript:void (0);\" onmouseover=\"return overlib('<center><B>&nbsp;North&nbsp;Dakota&nbsp;</B></center>', FGCOLOR, '#FFCCCC');\" onmouseout=\"nd();\" coords=\"245, 54, 312, 58, 320, 102, 241, 97\" shape=\"poly\"/><area href=\"javascript:onlineCoursesStateClicked(); javascript:void (0);\" onmouseover=\"return overlib('<center><B>&nbsp;South&nbsp;Dakota&nbsp;</B></center>', FGCOLOR, '#FFCCFF');\" onmouseout=\"nd();\" shape=\"poly\" coords=\"240, 96, 238, 144, 305, 147, 318, 154, 320, 131, 319, 107, 320, 101\"/><area href=\"javascript:onlineCoursesStateClicked(); javascript:void (0);\" onmouseover=\"return overlib('<center><B>&nbsp;Nebraska&nbsp;</B></center>', FGCOLOR, '#CCFFCC');\" onmouseout=\"nd();\" shape=\"poly\" coords=\"238, 145, 235, 171, 257, 174, 256, 189, 335, 192, 319, 156, 307, 145, 241, 142\"/><area href=\"javascript:onlineCoursesStateClicked(); javascript:void (0);\" onmouseover=\"return overlib('<center><B>&nbsp;Kansas&nbsp;</B></center>', FGCOLOR, '#FFCCFF');\" onmouseout=\"nd();\" shape=\"poly\" coords=\"255, 193, 254, 233, 343, 237, 343, 201, 334, 192, 257, 187, 256, 189\"/><area href=\"javascript:onlineCoursesStateClicked(); javascript:void (0);\" onmouseover=\"return overlib('<center><B>&nbsp;Oklahoma&nbsp;</B></center>', FGCOLOR, '#CCCCFF');\" onmouseout=\"nd();\" shape=\"poly\" coords=\"244, 234, 342, 237, 346, 285, 336, 280, 325, 282, 304, 282, 277, 269, 279, 243, 243, 242\"/><area href=\"javascript:onlineCoursesStateClicked(); javascript:void (0);\" onmouseover=\"return overlib('<center><B>&nbsp;Texas&nbsp;</B></center>', FGCOLOR, '#FFCCCC');\" onmouseout=\"nd();\" shape=\"poly\" coords=\"242, 242, 236, 307, 194, 302, 194, 305, 208, 325, 213, 334, 213, 338, 232, 352, 242, 339, 257, 344, 272, 365, 278, 375, 286, 394, 309, 402, 306, 381, 309, 372, 323, 361, 338, 353, 343, 348, 353, 340, 357, 323, 346, 291, 345, 284, 338, 281, 304, 280, 279, 270, 276, 245, 245, 241\"/><area href=\"javascript:onlineCoursesStateClicked(); javascript:void (0);\" onmouseover=\"return overlib('<center><B>&nbsp;New&nbsp;Mexico&nbsp;</B></center>', FGCOLOR, '#CCFFFF');\" onmouseout=\"nd();\" shape=\"poly\" coords=\"173, 225, 242, 233, 236, 306, 194, 303, 194, 305, 172, 306, 171, 309, 162, 309\"/><area href=\"javascript:onlineCoursesStateClicked(); javascript:void (0);\" onmouseover=\"return overlib('<center><B>&nbsp;Colorado&nbsp;</B></center>', FGCOLOR, '#FFFFCC');\" onmouseout=\"nd();\" shape=\"poly\" coords=\"180, 166, 256, 173, 253, 232, 173, 224\"/><area href=\"javascript:onlineCoursesStateClicked(); javascript:void (0);\" onmouseover=\"return overlib('<center><B>&nbsp;Wyoming&nbsp;</B></center>', FGCOLOR, '#CCFFFF');\" onmouseout=\"nd();\" shape=\"poly\" coords=\"167, 105, 240, 112, 237, 171, 161, 163\"/><area href=\"javascript:onlineCoursesStateClicked(); javascript:void (0);\" onmouseover=\"return overlib('<center><B>&nbsp;Montana&nbsp;</B></center>', FGCOLOR, '#FFFFCC');\" onmouseout=\"nd();\" coords=\"128, 39, 248, 54, 239, 110, 169, 103, 166, 109, 148, 110, 142, 89, 134, 91, 133, 86, 139, 76, 126, 61\" shape=\"poly\"/><area href=\"javascript:onlineCoursesStateClicked(); javascript:void (0);\" onmouseover=\"return overlib('<center><B>&nbsp;Idaho&nbsp;</B></center>', FGCOLOR, '#FFCCCC');\" onmouseout=\"nd();\" shape=\"poly\" coords=\"118, 36, 127, 39, 128, 60, 141, 78, 135, 89, 144, 90, 144, 101, 155, 110, 164, 110, 162, 147, 97, 138, 102, 107, 102, 101, 114, 83, 110, 80, 109, 67\"/><area href=\"javascript:onlineCoursesStateClicked(); javascript:void (0);\" onmouseover=\"return overlib('<center><B>&nbsp;Utah&nbsp;</B></center>', FGCOLOR, '#CCCCFF');\" onmouseout=\"nd();\" shape=\"poly\" coords=\"129, 142, 113, 215, 171, 225, 181, 164, 162, 162, 160, 145\"/><area href=\"javascript:onlineCoursesStateClicked(); javascript:void (0);\" onmouseover=\"return overlib('<center><B>&nbsp;Arizona&nbsp;</B></center>', FGCOLOR, '#CCFFCC');\" onmouseout=\"nd();\" shape=\"poly\" coords=\"113, 217, 173, 225, 162, 308, 134, 305, 93, 280, 98, 270, 100, 257, 104, 256, 104, 240, 103, 225, 110, 230\"/><area href=\"javascript:onlineCoursesStateClicked(); javascript:void (0);\" onmouseover=\"return overlib('<center><B>&nbsp;Nevada&nbsp;</B></center>', FGCOLOR, '#FFFFCC');\" onmouseout=\"nd();\" shape=\"poly\" coords=\"64, 129, 129, 143, 110, 229, 105, 226, 104, 250, 53, 171\"/><area href=\"javascript:onlineCoursesStateClicked(); javascript:void (0);\" onmouseover=\"return overlib('<center><B>&nbsp;Washington&nbsp;</B></center>', FGCOLOR, '#CCFFCC');\" onmouseout=\"nd();\" coords=\"63, 23, 117, 36, 109, 71, 109, 80, 92, 74, 54, 71, 48, 68, 49, 62, 43, 58, 42, 26, 60, 33, 60, 45, 68, 35\" shape=\"poly\"/><area href=\"javascript:onlineCoursesStateClicked(); javascript:void (0);\" onmouseover=\"return overlib('<center><B>&nbsp;Oregon&nbsp;</B></center>', FGCOLOR, '#CCFFFF');\" onmouseout=\"nd();\" shape=\"poly\" coords=\"42, 59, 20, 103, 19, 114, 22, 117, 98, 135, 104, 105, 103, 100, 115, 83, 91, 71, 58, 73, 50, 66\"/><area href=\"javascript:onlineCoursesStateClicked(); javascript:void (0);\" onmouseover=\"return overlib('<center><B>&nbsp;California&nbsp;</B></center>', FGCOLOR, '#FFCCFF');\" onmouseout=\"nd();\" shape=\"poly\" coords=\"19, 115, 65, 126, 56, 171, 104, 250, 104, 258, 100, 259, 94, 278, 61, 276, 64, 265, 47, 244, 28, 234, 24, 198, 20, 192, 22, 183, 15, 170, 14, 160, 14, 153, 10, 140, 20, 127\"/><area href=\"javascript:onlineCoursesStateClicked(); javascript:void (0);\" onmouseover=\"return overlib('<center><B>&nbsp;Hawaii&nbsp;</B></center>', FGCOLOR, '#FFCCFF');\" onmouseout=\"nd();\" shape=\"poly\" coords=\"383, 402, 413, 411, 441, 424, 451, 429, 462, 442, 472, 447, 480, 461, 464, 470, 459, 470, 453, 458, 453, 453, 456, 444, 441, 439, 429, 428, 418, 422, 408, 422, 407, 419, 385, 411, 368, 411, 366, 407, 373, 407\"/></map>";
		
		//document.getElemenById('map-usa').style.display.visibility = 'visible';
	
		//don't redirect
		return false;
	}
	
	registrationLink.onclick = function() {
	
		// set main content
		mainContent.innerHTML = "<img src='assets/registration.png' height='50' /><BR /><div style=\"float:right\">Mid-State School of Insurance and Finance<BR />P.O. Box 588, Woodburn, OR 97071<BR />Phone: 1-800-853-9065<BR />Fax: 1-800-853-3721<BR />email:info@midstateschool.com</div><img src=\"assets/mss-logo-rev-5.png\" /><BR /><BR /><BR /><form name=\"register_new_user\" action=\"svc/register.php\" method=\"post\">First Name<BR /><input id=\"firstname\" name=\"firstname\" type=\"text\" size=\"30\" /><BR/>Last Name<BR /><input id=\"lastname\" name=\"lastname\" type=\"text\" size=\"30\" /><BR />Street<BR /><input id=\"street\" name=\"steet\" type=\"text\" size=\"40\" /><BR /><table><tr><td>City</td><td>State</td><td>Zip</td></tr><tr><td><input id=\"city\" name=\"city\" type=\"text\" size=\"40\" /></td><td><input id=\"state\" name=\"state\" type=\"text\" maxlength=\"2\" size=\"2\" /></td><td><input id=\"zip\" name=\"zip\" type=\"text\" maxlength=\"5\" size=\"5\" /></td></tr></table><BR />Phone<BR /><input id=\"phone\" name=\"phone\" type=\"text\" maxlength=\"11\" size=\"12\" /><BR />Fax<BR /><input id=\"fax\" name=\"fax\" type=\"text\" maxlength=\"11\" size=\"12\" /><BR />Email<BR /><input id=\"email\" name=\"email\" type=\"text\" size=\"22\" /><BR /><BR /><p><b>*Idaho agents, state law mandates that they will no longer accept your social security number as proof of identity when we make our reports to them.  Please provde ONLY your insurance license number.</b></p>Insurance License<BR /><input id=\"insurancelicense\" name=\"insurancelicense\" type=\"text\" size=\"12\" /><BR />SSN<BR /><input id=\"ssn\" name=\"ssn\" type=\"text\" size=\"12\" /><BR /><BR /><b>Please choose a username and password.</B><BR />Username<BR /><input id=\"username\" name=\"username\" type=\"text\" size=\"12\" /><BR />Password<BR /><input id=\"password\" name=\"password\" type=\"text\" size=\"12\" /><BR /><BR /><input type=\"button\" value=\"REGISTER\" onClick=\"doRegister()\" /></form><BR />";
	
		//don't redirect
		return false;
	}
	
	contactLink.onclick = function() {
	
		// set main content
		mainContent.innerHTML = "<img src='assets/contactus.png' height='30' /><BR>Mid State School<BR />P.O. Box 588<BR />Woodburn, OR 97071<BR /><BR />Phone: 1-800-853-9065<BR />Fax: 1-800-853-3721<BR />Email: <a href=\"mailto:info@midstateschool\">info@midstateschool.com</a><BR /><BR />Hours: 9am - 6pm PST";
	
		//don't redirect
		return false;
	}
	
	
}