var popupDialog=null;
var d=document;
var b=window;
var headRef=document.getElementsByTagName("head")[0];
var hrefCounter=0;
var imagePath="/admissions/images/";
function showYouTubePlayer(e,k){var c="http://www.youtube.com/v/"+e+"?autoplay=1&amp;fs=1&amp;hl=en_US&amp;rel=0&amp;hd=1";
var g=25;
var j=/x/i;
if(k.search(j)>-1){var a=k.split("x");
var l=parseInt(a[0]);
var i=parseInt(a[1])
}else{if(k=="4:3"){var l=640;
var i=480+g
}else{var l=640;
var i=360+g
}}var f="<object width='"+l+"' height='"+i+"'> ";
f+="<param name='movie' value='"+c+"'></param> ";
f+="<param name='allowFullScreen' value='true'></param> ";
f+="<param name='allowscriptaccess' value='always'></param> ";
f+="<param name='autoplay' value='true'></param> ";
f+="<embed src='"+c+"' type='application/x-shockwave-flash' ";
f+=" allowscriptaccess='always' autoplay='true' allowfullscreen='true' width='"+l+"' height='"+i+"'> ";
f+="</embed></object>";
showPopupDialog(f,l,i)
}function selectAndPlayVideo(g){if(!g){var g=window.event
}if(g.target){targetRef=g.target
}else{if(g.srcElement){targetRef=g.srcElement
}}if(targetRef.nodeType==3){targetRef=targetRef.parentNode
}targetRef=targetRef.parentNode;
if(targetRef.nodeName!="A"){return
}var f=targetRef.href;
var c=getParam(f,"v");
isStandardDef=getParam(f,"sd");
if(isStandardDef){var a="4:3"
}else{var a="16:9"
}showYouTubePlayer(c,a);
getObjectByID("popupDialog").style.overflow="hidden"
}function showPopupDialog(g,e,f){var a=3;
createPopupDialog();
getObjectByID("popupContentDiv").style.marginTop=(a+1)+"px";
getObjectByID("popupContentDiv").style.marginLeft=(a+1)+"px";
getObjectByID("popupContentDiv").style.marginBottom="0px";
getObjectByID("popupContentDiv").style.marginRight="0px";
popupDialog.style.width=(e+(a*2)+2)+"px";
popupDialog.style.height=(f+(a*2)+2)+"px";
getObjectByID("popupContentDiv").innerHTML=g;
topOffset=getScrollTop();
absoluteCenter("popupDialog",topOffset+26,0);
absoluteCenter("popupDialogCloseButton",(parseInt(f/2)*-1)-22+26+topOffset,parseInt(e/2)+4);
popupDialogCloseButton.style.display="";
var i=e/422;
getObjectByID("dropShadow").style.width=parseInt(e+(68*i))+"px";
getObjectByID("dropShadow").style.height=parseInt(f+(73*i))+"px";
absoluteCenter("dropShadow",topOffset+parseInt((7*i)+(3.33*i))+26,parseInt((7*i)+(3.33*i)));
var c=getObjectByID("mask");
c.style.height=parseInt(getDocHeight())+"px";
c.style.display=""
}function showPopupImage(e,a,c){var f="<img src='"+e+"' width='"+a+"' height='"+c+"' />";
showPopupDialog(f,a,c)
}function createPopupDialog(){if(getObjectByID("popupDialog")==null){var a=window.d.body;
if(!a){a=d.body
}if(!a){a=window
}var e=d.createElement("img");
e.id="dropShadow";
e.src=imagePath+"videoPlayer-dropShadow.png";
e.style.display="none";
popupDialog=d.createElement("div");
popupDialog.id="popupDialog";
popupDialog.style.display="none";
html="<div id='popupContentDiv'></div>";
popupDialog.innerHTML=html;
popupDialogCloseButton=d.createElement("div");
popupDialogCloseButton.id="popupDialogCloseButton";
popupDialogCloseButton.style.display="none";
html="	<a href='javascript: hidePopupDialog();'>";
html+="		<img src='"+imagePath+"icon-close_button.png' border='0' alt='Close this video' title='Close this video' />";
html+="	</a>";
popupDialogCloseButton.innerHTML=html;
a.appendChild(e);
a.appendChild(popupDialog);
a.appendChild(popupDialogCloseButton);
var c=getObjectByID("mask");
if(!c){var c=d.createElement("img");
c.src=imagePath+"background-video_mask.png";
c.id="mask";
a.appendChild(c)
}hidePopupDialog()
}popupDialog.style.display="";
getObjectByID("dropShadow").style.display=""
}function resizeMask(){if(getObjectByID("mask")){var a=getDocHeight();
getObjectByID("mask").style.width="100%";
getObjectByID("mask").style.height=a+"px"
}}function hidePopupDialog(){getObjectByID("popupDialogCloseButton").style.display="none";
popupDialog.style.display="none";
getObjectByID("dropShadow").style.display="none";
getObjectByID("popupContentDiv").innerHTML="";
getObjectByID("mask").style.display="none";
getObjectByID("popupDialog").style.overflow="auto"
}function setNextTitle(e){var i=e.entry.title.$t;
var c=e.entry.media$group.media$content[0].duration;
var g=e.entry.id.$t;
var f=g.split("/");
videoID=f.pop();
var h=getObjectByID(videoID);
var a=document.createElement("div");
a.className="videoTitle";
h.appendChild(a);
a.innerHTML=i;
h.title=i+" video ("+secondsToMSS(c)+")";
hrefCounter++
}function secondsToMSS(c){c=parseInt(c);
var e=parseInt(c/60);
var a=c-(e*60);
return e+":"+padLeft(a,"0",2)
}function padLeft(f,c,a){var e=""+f;
while(e.length<a){e=c+e
}return e
}function getParam(c,j){var a=null;
if(c){g=c.split("?")
}else{var g=location.href.split("?")
}if(g.length>1){var f=g[1].split("&");
var h=new Array();
var i;
var e;
for(p=0;
p<f.length;
p++){h=f[p].split("=");
e=h[0];
i=h[1];
if(e==j){a=i;
break
}}}return a
}var EventUtil={addHandler:function(a,e,c){if(a.addEventListener){a.addEventListener(e,c,false)
}else{if(a.attachEvent){a.attachEvent("on"+e,c)
}else{a["on"+e]=c
}}},getButton:function(a){if(d.implementation.hasFeature("MouseEvents","2.0")){return a.button
}else{switch(a.button){case 0:case 1:case 3:case 5:case 7:return 0;
case 2:case 6:return 2;
case 4:return 1
}}},getCharCode:function(a){if(typeof a.charCode=="number"){return a.charCode
}else{return a.keyCode
}},getClipboardText:function(a){var c=(a.clipboardData||window.clipboardData);
return c.getData("text")
},getEvent:function(a){return a?a:window.event
},getRelatedTarget:function(a){if(a.relatedTarget){return a.relatedTarget
}else{if(a.toElement){return a.toElement
}else{if(a.fromElement){return a.fromElement
}else{return null
}}}},getTarget:function(a){return a.target||a.srcElement
},getCurrentTarget:function(a){return a.currentTarget||this
},getWheelDelta:function(a){if(a.wheelDelta){return(client.engine.opera&&client.engine.opera<9.5?-a.wheelDelta:a.wheelDelta)
}else{return -a.detail*40
}},preventDefault:function(a){if(a.preventDefault){a.preventDefault()
}else{a.returnValue=false
}},removeHandler:function(a,e,c){if(a.removeEventListener){a.removeEventListener(e,c,false)
}else{if(a.detachEvent){a.detachEvent("on"+e,c)
}else{a["on"+e]=null
}}},setClipboardText:function(a,c){if(a.clipboardData){a.clipboardData.setData("text/plain",c)
}else{if(window.clipboardData){window.clipboardData.setData("text",c)
}}},stopPropagation:function(a){if(a.stopPropagation){a.stopPropagation()
}else{a.cancelBubble=true
}}};
function getObjectByID(a){if(d.getElementById){return d.getElementById(a)
}else{if(d.all){return d.all[a]
}else{if(d.layers){return d.layers[a]
}else{return d.getElementById(a)
}}}}function getScrollTop(){scrollOffsetY=0;
if(typeof(window.pageYOffset)=="number"){scrollOffsetY=window.pageYOffset
}else{if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){scrollOffsetY=document.body.scrollTop
}else{if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){scrollOffsetY=document.documentElement.scrollTop
}}}return scrollOffsetY
}function absoluteCenter(i,e,f){var g=getObjectByID(i);
if(!e){e=0
}if(!f){f=0
}g.style.position="absolute";
g.style.top="50%";
g.style.left="50%";
var a=g.style.width;
var c=g.style.height;
if(!a){var a=g.offsetWidth
}if(!c){var c=g.offsetHeight
}a=parseInt(a);
c=parseInt(c);
g.style.marginTop=((parseInt(c/2)*-1)+e)+"px";
g.style.marginLeft=((parseInt(a/2)*-1)+f)+"px";
var h=new Array();
h[0]=(parseInt(c/2)*-1)+e;
h[1]=(parseInt(a/2)*-1)+f;
return h
}function getDocHeight(){return Math.max(Math.max(d.body.scrollHeight,d.documentElement.scrollHeight),Math.max(d.body.offsetHeight,d.documentElement.offsetHeight),Math.max(d.body.clientHeight,d.documentElement.clientHeight))
}EventUtil.addHandler(window,"resize",function(a){resizeMask()
});
decorateYoutubeLinks=function(g){var i;
g=g||document;
if(!g.getElementsByClassName){g.getElementsByClassName=function(n){var m=new RegExp("(?:^|\\s)"+n+"(?:$|\\s)");
var o=g.getElementsByTagName("*");
var l=[];
var k;
for(var j=0;
(k=o[j])!=null;
j++){var q=k.className;
if(q&&q.indexOf(n)!=-1&&m.test(q)){l.push(k)
}}return l
}
}var h=g.getElementsByClassName("videoIcon");
var f;
var e;
var c;
for(i=0;
i<h.length;
i++){iconRef=h[i];
f=h[i].href;
e=getParam(f,"v");
iconRef.id=e;
thumbnailImgPath="http://img.youtube.com/vi/"+e+"/default.jpg";
c="<img src='"+thumbnailImgPath+"' border='0' />";
c+="<div class='videoIcon-play'></div>";
iconRef.innerHTML=c;
var a=document.createElement("script");
a.type="text/javascript";
a.src="http://gdata.youtube.com/feeds/api/videos/"+e+"?alt=json-in-script&callback=setNextTitle";
headRef.appendChild(a);
if(e){EventUtil.addHandler(iconRef,"click",function(j){selectAndPlayVideo(j);
EventUtil.preventDefault(j)
});
e=""
}}};
