function WriteFlash1()
{
   document.write('<div id="flashbox"><div name="loadlast" id="loadlast"><object type="application/x-shockwave-flash" data="video1.swf" width="324" height="193" class="flash">\n');
   document.write('<param name="movie" value="video1.swf" />\n');
   document.write('<param name="wmode" value="opaque" />\n');
   document.write('<param name="menu" value="false" />\n');
   document.write('<!--[if IE 7]><embed src="video1.swf" width="324" height="193" quality="high" wmode="opaque" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" menu="false" class="flash" style="display:none;" name="loadlast"></embed><style type="text/css" media="all"> #noflash {display:none;}; </style><![endif]-->\n');
   document.write('<a href="contact-laurus-technical-institute.asp"><img src="img/noflash.jpg" alt="" id="noflash" /></a>\n');
   document.write('</object><span class="noflash">Video not playing? Upgrade to the latest version of <a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" target="_blank">Flash</a>.</span></div></div>\n');
}
function WriteFlash2()
{
   document.write('<div id="flashbox"><div name="loadlast" id="loadlast"><object type="application/x-shockwave-flash" data="video2.swf" width="324" height="193" class="flash">\n');
   document.write('<param name="movie" value="video2.swf" />\n');
   document.write('<param name="wmode" value="opaque" />\n');
   document.write('<param name="menu" value="false" />\n');
   document.write('<!--[if IE 7]><embed src="video2.swf" width="324" height="193" quality="high" wmode="opaque" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" menu="false" class="flash" style="display:none;" name="loadlast"></embed><style type="text/css" media="all"> #noflash {display:none;}; </style><![endif]-->\n');
   document.write('<a href="contact-laurus-technical-institute.asp"><img src="img/noflash.jpg" alt="" id="noflash" /></a>\n');
   document.write('</object><span class="noflash">Video not playing? Upgrade to the latest version of <a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" target="_blank">Flash</a>.</span></div></div>\n');
}
function WriteFlash3()
{
   document.write('<div id="flashbox"><div name="loadlast" id="loadlast"><object type="application/x-shockwave-flash" data="video3.swf" width="324" height="193" class="flash">\n');
   document.write('<param name="movie" value="video3.swf" />\n');
   document.write('<param name="wmode" value="opaque" />\n');
   document.write('<param name="menu" value="false" />\n');
   document.write('<!--[if IE 7]><embed src="video3.swf" width="324" height="193" quality="high" wmode="opaque" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" menu="false" class="flash" style="display:none;" name="loadlast"></embed><style type="text/css" media="all"> #noflash {display:none;}; </style><![endif]-->\n');
   document.write('<a href="contact-laurus-technical-institute.asp"><img src="img/noflash.jpg" alt="" id="noflash" /></a>\n');
   document.write('</object><span class="noflash">Video not playing? Upgrade to the latest version of <a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" target="_blank">Flash</a>.</span></div></div>\n');
}

function load_form() {
	if (document.contact.locations.value == false) {
      alert("Please choose a location.");
	  document.contact.locations.focus();
	  return false
   }
   if (document.contact.programs.value == false) {
      alert("Please choose a program.");
	  document.contact.programs.focus();
	  return false
   }
   else
	document.getElementById("contacthidden").style.display = "block";
	document.getElementById("continue").style.display = "none";
	document.getElementById("quicklinks").style.zIndex = "-1";
}
	
function close_form()
{
	document.getElementById("contacthidden").style.display = "none";
	document.getElementById("continue").style.display = "block";
	document.getElementById("quicklinks").style.zIndex = "2";
}

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 KW_updateItems(d,o,fn) { //
	var i,s,l=MM_findObj(d),b,z=o.options[o.selectedIndex].value;
	var optioncount = 0;
	l.length=0;
	l.options[0]=new Option('Choose a Program \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u2193','Choose a Program \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u2193');
	b=(z!='nill')?eval(z+'_items'):0;
	b.sort()
	for(i=0;i<b.length;i++){
			s=b[i].split("|");
			if (s[0] == 'Undecided') {
				
			}
			else {
				l.options[optioncount]=new Option(s[1],s[0]);
				optioncount++;
			}
	}
  l.selectedIndex=0;
  if (!fn) return;eval(fn)
}

/////////////////////////////////////////////////////////////
// Toggle programs drop-down when campus is selected
function togglefield()
{
  var campus = document.contact.locations.value;
  if (campus=="0") {
  	document.contact.programs.disabled = true;
  } else {
  	document.contact.programs.disabled = false;
  }
}
//////////////////////////////////////////////////////////

function clearText(thefield){
if (thefield.defaultValue==thefield.value)
thefield.value = ""
} 

function update_campusid() {
   if (document.contact.locations.value.toLowerCase() == "decatur") {
      document.contact.campusid.value = 1232;
   }
   else {
      document.contact.campusid.value = 15720;
   }
}

function valid_phone() {
   if (document.contact.phone.value == "000-000-0000") {
      document.contact.phone.value = "";
   }
}

function load_flash(){
      var objFlash = document.getElementsByName("loadlast");
      for(var i = 0; i < objFlash.length; i++){
          objFlash[i].style.display = "block";
      }
   }
   
/** JavaScript **/
ieHover = function() {
var ieULs = document.getElementById('nav').getElementsByTagName('ul');
/** IE script to cover <select> elements with <iframe>s **/
for (j=0; j<ieULs.length; j++) {
ieULs[j].innerHTML = ('<iframe src="about:blank" scrolling="no" frameborder="0"></iframe>' + ieULs[j].innerHTML);
/*ieULs[j].innerHTML = ('<iframe id="iePad' + j + '" src="about:blank" scrolling="no" frameborder="0" style=""></iframe>' + ieULs[j].innerHTML);
	var ieMat = document.getElementById('iePad' + j + '');*/
//	var ieMat = ieULs[j].childNodes[0];  alert(ieMat.nodeName); // also works...
	var ieMat = ieULs[j].firstChild;
		ieMat.style.width=ieULs[j].offsetWidth+"px";
		ieMat.style.height=ieULs[j].offsetHeight+"px";	
		ieULs[j].style.zIndex="99";
}
/** IE script to change class on mouseover **/
	var ieLIs = document.getElementById('nav').getElementsByTagName('li');
	for (var i=0; i<ieLIs.length; i++) if (ieLIs[i]) {
		ieLIs[i].onmouseover=function() {this.className+=" iehover";}
		ieLIs[i].onmouseout=function() {this.className=this.className.replace(' iehover', '');}
	}}
if (window.attachEvent) window.attachEvent('onload', ieHover);
/** end **/