function getTrackingCode(){
 var IT = getCookie("IT");
 //if(!IT){
  var cookieTime = new Date();

  // cookie expires in 10 years (3650 days)
  cookieTime.setTime(cookieTime.getTime() + 3650 * 24 * 60 * 60 * 1000);

  if(location.search){
   var ary  = window.location.search.substr(1).split("&");
   var qStr = new Array();

   for(i = 0; i < ary.length; i++) ary[i] = ary[i].split("=");
   for(i = 0; i < ary.length; i++){
    ary[i][0] = ary[i][0].replace(/\+/g," ");
    ary[i][0] = unescape(ary[i][0]);
    ary[i][1] = ary[i][1].replace(/\+/g," ");
    ary[i][1] = unescape(ary[i][1]);
    qStr[ary[i][0]] = ary[i][1];
   }

   var trackingCode = qStr["IT"];
   setCookie("IT", trackingCode, cookieTime,"",".academyart.edu");

  }
 }
//}

function gotoRequestInfo(){
 var IT = getCookie("IT");
 newURL = 'https://apply.academyart.edu/gen/inquiry/inquiry_step1.asp?IT=' + IT;
 window.open(newURL,"Applications","toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=1000,height=730,left=0,top=0,xscreen=0,yscreen=0");
}
function gotoAthleticsForm(){
 var IT = getCookie("IT");
 newURL = 'http://www.academyart.edu/inquiry/index_athletics.jsp?IT=' + IT;
 window.open(newURL,"Applications","toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=1000,height=730,left=0,top=0,xscreen=0,yscreen=0");
}


function gotoApply(){
 //Feb 19, 2008 Neo Wang. Comment out following code checking Vista because new certificate works now.
 //Check if user is using Windows vista
 //if (navigator.userAgent.indexOf("Windows NT 6") > -1) {
 //  alert("Due to your operating system's security settings, you may be unable to see the secure online application. \n\nIf you receive an error message, please call web support at 800-544-2787 or 415-618-3590 for assistance.\n\nClick OK to continue.");
 //}

 var IT = getCookie("IT");
 newURL = 'https://apply.academyart.edu/apply/login.htm?IT=' + IT;
 window.open(newURL,"Applications","toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=800,height=600,left=0,top=0,xscreen=0,yscreen=0");
}

function gotoArt(){
newURL = 'http://media.academyart.edu/presentations/promoVideo/promoVideo.html';
window.open(newURL,"tdaPopup","resizable,scrollbars=no,width=350,height=355");
}

function getQuickLink(URL){
  var selIndex = URL.selectedIndex;
  var selValue = URL.options[selIndex].value;

  if((selValue.substring(0,4) == "http" )){
   window.open(selValue,'_blank');
  }
  else window.open(selValue,'_parent');
 }

 