function loadschoolid(Obj) {
   var oSid = document.contact.school_id; //Campus's school id   
    var campusid = document.contact.campusid; //Campus's school id   
  //var oSem = document.getElementById('email_to');  //Campus's lead delivery e-mail address
  switch (Obj.options[Obj.selectedIndex].value) {
    case 'Louisville':
    oSid.value = '5366';
	campusid.value='18';
//    oSem.value = '';
    break;
    case 'Newport':
    oSid.value = '6987';
	campusid.value='19';
//    oSem.value = '';
    break;
    case 'Owensboro':
    oSid.value = '5229';
	campusid.value='20';
//    oSem.value = '';
    break;
    case 'Paducah':
    oSid.value = '8488';
	campusid.value='21';
//    oSem.value = '';
    break;
  }
}

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('Please Select a Program','Please Select a Program');
	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)
}

function utmx_section(){}function utmx(){}
(function(){var k='1192249894',d=document,l=d.location,c=d.cookie;function f(n){
if(c){var i=c.indexOf(n+'=');if(i>-1){var j=c.indexOf(';',i);return c.substring(i+n.
length+1,j<0?c.length:j)}}}var x=f('__utmx'),xx=f('__utmxx'),h=l.hash;
d.write('<sc'+'ript src="'+
'http'+(l.protocol=='https:'?'s://ssl':'://www')+'.google-analytics.com'
+'/siteopt.js?utmxkey='+k+'&utmx='+(x?x:'')+'&utmxx='+(xx?xx:'')+'&utmxtime='
+new Date().valueOf()+(h?'&utmxhash='+h.substr(1):'')+
'" type="text/javascript" charset="utf-8"></sc'+'ript>')})();

function validateFirstHalf() {
	var campus;
	var program = document.getElementById("program");
	var gradyear = document.getElementById("gradyear");
	var form1 = document.getElementById("step1");
	var form2 = document.getElementById("step2");
	if (document.getElementById("clientid")) var campus = document.getElementById("clientid");
	if (campus && campus.selectedIndex == 0) {
		alert("Please select a campus.");
	} else if (program.selectedIndex == 0) {
		alert("Please select a program.");
	} else if (gradyear.selectedIndex == 0) {
		alert("Please select a high school graduation year.");
	} else {
		form1.style.display = "none";
		form2.style.display = "block";
	}
}

function setSection() {
	var section = new String('');
	var tab = "tab_" + section;
	var content = "content_" + section;
	if ((section.length)&&(document.getElementById(tab))) show(content,tab);
}

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 show(objId,tabId) {
	var divs = new Array("content_about","content_programs","content_locations","content_accreditation");
	var tabs = new Array("tab_about","tab_programs","tab_locations","tab_accreditation");
	var obj = document.getElementById(objId);
	var tab = document.getElementById(tabId);
	for (i=0; i<divs.length; i++) document.getElementById(divs[i]).style.display = "none";
	for (i=0; i<tabs.length; i++) document.getElementById(tabs[i]).className = "";
	obj.style.display = "block";
	tab.className = "on";
}
