//JScript File


/** spawns new window - able to set height/width **/
function popUp(URL,w,h) {
    winLeft = (screen.width-w)/2; 
    winTop = (screen.height-(h+110))/2; 
    window.open(URL, 'jobs', 'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width='+w+',height='+h+',left='+winLeft+',top='+winTop);
    }

//write menu
function writeSecondLevelMenuLinks(theArray,divName,thePageID,breakWhere,break2)
{
    var myTxt = '';
    for (x in theArray)
    {
        if(thePageID != x)
        {   
            myTxt = myTxt + '<a href="' + theArray[x][1] + '"' // write the link
            
            if(theArray[x][1].indexOf('pdf') > 0)
                 myTxt = myTxt + ' target="_blank"';
            
            myTxt = myTxt + '>' + theArray[x][0] + '</a>'       // write the link text
        }
        else
        {   myTxt = myTxt + '<b>' + theArray[x][0] + '</b>' }
        
        if(breakWhere == x || break2 ==x){myTxt = myTxt + '<br />'}
        else 
        {     
            if(theArray.length-1 != x)               
            myTxt = myTxt + ' | '
        }
    }
    document.getElementById(divName).innerHTML  = myTxt;
}

function PrintThisPage() 
{ 
   var sOption="toolbar=yes,location=no,directories=yes,menubar=yes,"; 
       sOption+="scrollbars=yes,width=750,height=600,left=100,top=25"; 

   var sWinHTML = document.getElementById('PrintFriendly').innerHTML; 
   
   var winprint=window.open("","",sOption); 
       winprint.document.open(); 
       winprint.document.write('<html>');
       winprint.document.write('<style type="text/css">#topRightCIMS,.videoLinkBox,#subImage,#topRightLinkBox,#topRightImage{float:right;border:solid 1px #cccccc;margin:10px;}</style>');
       winprint.document.write('<body>'); 
       winprint.document.write('<script language="javascript">pages=0;function writeSecondLevelMenuLinks(a,b,c,d){x=1;}</script>');
       winprint.document.write('<div style="width:auto;background-color:#006432;"><img src="http://www3.babson.edu/images/headerlogo.gif" width="291" height="92" /></div>');
       winprint.document.write(sWinHTML);          
       winprint.document.write('</body></html>'); 
       winprint.document.close(); 
       winprint.focus(); 
       winprint.print();
       //winprint.close();
}
