var isNS = 0;
var browser = navigator.appName;

if (browser == "Netscape"){ isNS = 1; }


function getStyleObject(objectId) {

  if (document.getElementById && document.getElementById(objectId)){
    return document.getElementById(objectId).style;
  } 
  else if (document.all && document.all(objectId)){
    return document.all(objectId).style;
  } 
  else {
    return false;
  }
}

function hideAll()
{
   var the_style_IE1 = getStyleObject("IE1");
   the_style_IE1.display = 'none';
   var the_style_NS1 = getStyleObject("NS1");
   the_style_NS1.display = 'none';
   var the_style_IE2 = getStyleObject("IE2");
   the_style_IE2.display = 'none';
   var the_style_NS2 = getStyleObject("NS2");
   the_style_NS2.display = 'none';
   var the_style_IE3 = getStyleObject("IE3");
   the_style_IE3.display = 'none';
   var the_style_NS3 = getStyleObject("NS3");
   the_style_NS3.display = 'none';
}

function changeDiv()
{
 var the_div1 = ""
 var the_div2 = ""
 var the_div3 = ""
  if (isNS){
    the_div1 = "NS1";
    the_div2 = "NS2";
    the_div3 = "NS3";}
  else {
    the_div1 = "IE1";
    the_div2 = "IE2";
    the_div3 = "IE3";}

   var the_style1 = getStyleObject(the_div1);
   if (the_style1 != false)
   {
     the_style1.display = 'block';
   }
  var the_style2 = getStyleObject(the_div2);
   if (the_style2 != false)
   {
     the_style2.display = 'block';
   }
  var the_style3 = getStyleObject(the_div3);
   if (the_style3 != false)
   {
     the_style3.display = 'block';
   }

 }

function reposition1(){
 var the_div1 = ""
 var the_div2 = ""

  if (!isNS){
    the_div1 = "middle";
    the_div2 = "bottom";}

   var the_style1 = getStyleObject(the_div1);
   if (the_style1 != false)
   {
     the_style1.position = 'relative';
     the_style1.top = -20;
   }
  var the_style2 = getStyleObject(the_div2);
   if (the_style2 != false)
   {
     the_style2.position = 'relative';
     the_style2.top = -20;
   }
}


function popupWindow(u) { 
	window.open('https://www.cln.iupui.edu/'+u,'','width=950,height=800,scrollbars=no'); 
}

function popupWindowCatalog(u) { 
	window.open('https://www.cln.iupui.edu/'+u,'mywindow','width=950,height=800,toolbar=no,menubar=no,scrollbars=no,resizable=no');
}

function popupWindowCatalog2(u) { 
	window.open('https://www.cln.iupui.edu/apps/catalog/index.asp?site=IUPUI&cat='+ u,'','width=950,height=800,scrollbars=no'); 
}

function popupWindow4(u) { 
	window.open('https://www.cln.iupui.edu/'+u,'','width=950,height=800,scrollbars=no'); 
}

function popupWindow2(u) { 
	window.open('https://www.cln.iupui.edu/'+u,'','width=950,height=800,scrollbars=no'); 
}

function popupWindow3(u) { 
	window.open('https://www.cln.iupui.edu/'+u,'','width=950,height=800,scrollbars=no'); 
}

function openacct(s) {
	popupWindow("apps/acct/index.asp?site="+s);
}

function opencatsrch(s) {
	popupWindow("apps/catalog/index.asp?site=IUPUI&srchloc="+s);
}

function opencatalog(s) {
	if (s=="IUPUI2") {
		popupWindow("apps/newcatalog/index.asp?site=IUPUI");
	} else if (s=="IUPUI-OLT") {
		popupWindow("apps/catalog/index.asp?site=IUPUI&ex=Computers%2b/%2bElectronic%2bCourses%2bon%2bCD&link=Computers%2b/%2bElectronic%2bCourses%2bon%2bCD");
	} else if (s=="IUPUI-CP") {
		popupWindow("apps/catalog/index.asp?site=IUPUI&cat=Certificate%2bPrograms");
	} else if (s.substring(0,3)=="TRC") {
		popupWindow4("apps/trc/index.asp?site="+s);
	} else if (s=="PROJ-NP") {
		popupWindow("apps/catalog/index.asp?site=PROJ&ex=Computers%2b/%2bElectronic%2bCourses%2bon%2bCD&link=Computers%2b/%2bElectronic%2bCourses%2bon%2bCD");
	} else if (s=="PROJ-LLI") {
		popupWindow("apps/catalog/index.asp?site=PROJ&cat=Lifelong%2bLearning%2bInstitute");
	} else if (s=="CREDIT") {
		popupWindowCatalog("apps/credit/index.asp");
	} else {
		popupWindowCatalog("apps/catalog/index.asp?site="+s);
		   }
}

function opencredit(sem,cat) {
	popupWindowCatalog("apps/credit/index.asp?sem="+sem+"&cat="+cat);
}

function pmopen(page) {
	popupWindow('apps/pmain.asp?'+page);
}

function openins(crs) {
	popupWindow2('/apps/catalog/insinfo.asp?course='+crs);
}

function openloc(crs) {
	popupWindow3('/apps/catalog/locinfo.asp?course='+crs);
}

function openldesc(crs) {
	window.open('/apps/catalog/longdesc.asp?course='+crs);
}
