<!-- Begin Javascript
//####### Portal Functions - formerly main.js #######
var sliderStart=true;var sliderActive='ot_2';var intH_p=0;var intH_v=0;var intH_a=0;var intH_t=0;var bolSet_p=1;var bolSet_v=1;var bolSet_a=1;var bolSet_t=1;
var strDomain;var numSites=0;var arraySites;var strHeaderImg;var strCreditImg;var strCreditAlt;var strCreditTitle;var strCreditLink;var strMobileLink;var strHelpLink;var strEmailLink;var bolPhone=true;var bolMobile=true;var bolHelp=true;var bolSize=true;var bolPrint=true;var bolEmail=true;var strWall='';
function hdrConfigs(){doPrintFriendly();if (window.location!=top.location) {top.location = window.location;}if (document.layers) {origWidth = innerWidth;origHeight = innerHeight;}if (document.layers) onresize = reloadPage;if(!strDomain){strDomain=getDomain();}if(numSites>0){strDomain=strDomain+setSubsites();}if(strHeaderImg){setStyle('hdrImgBlock','background-image:url("'+strHeaderImg+'");');}if(strCreditImg){setAttrib('hdrTxt','src',strCreditImg);}if(strCreditAlt){setAttrib('hdrTxt','alt',strCreditAlt);}if(strCreditTitle){setAttrib('hdrTxt','title',strCreditTitle);}if(strCreditLink){setAttrib('hdrTxtLink','href',strCreditLink);}if(strDomain){setAttrib('hdrSrchAg','value',strDomain);}if(strMobileLink){setAttrib('hdrMobileLink','href',strMobileLink);}if(strHelpLink){setAttrib('hdrHelpLink','href',strHelpLink);}if(strEmailLink){setAttrib('hdrEmailLink','href',strEmailLink);setAttrib('hdrEmailLink','onclick','');}if(bolPhone==false){setClass('p1c','hDiv');setClass('p1c_t','hDiv');}if(bolMobile==false){setClass('p2c','hDiv');setClass('p2c_t','hDiv');}if(bolHelp==false){setClass('p3c','hDiv');setClass('p3c_t','hDiv');}if(bolSize==false){setClass('p4c','hDiv');setClass('p4c_t','hDiv');}if(bolPrint==false){setClass('p5c','hDiv');setClass('p5c_t','hDiv');}if(bolEmail==false){setClass('p6c','hDiv');setClass('p6c_t','hDiv');}setAttrib('btns','align','right');setClass('btns','sDiv');}
function gearConfigs(){setClass(sliderActive+'_a','hDiv');setSlider(sliderActive.substr(3,1));}
function getDomain(){var sDom=location.href.toLowerCase();sDom=sDom.substr(0,sDom.indexOf('.gov')+4);if(sDom!='htt'){return sDom;}else{return 'http://delaware.gov'}}
function openPopup(url,w,h,winname){var winl=(screen.width - w) / 2;var wint=(screen.height - h) / 2;popupWin=window.open(url,winname,'toolbar=1,location=1,directories=0,status=1,menubar=1,resizable=1,scrollbars=1,top='+wint+',screenY='+wint+',left='+winl+',screenX='+winl+',width='+w+',innerWidth='+w+',height='+h+',innerHeight='+h);}
function openPopupCast(url,h,w){var wint = (screen.height - h) / 2;var winl = (screen.width - w) / 2;popupWin = window.open(url,"castWin",'toolbar=0,location=0,directories=0,status=1,menubar=0,resizable=1,scrollbars=1,top='+wint+',screenY='+wint+',left='+winl+',screenX='+winl+',width='+w+',innerWidth='+w+',height='+h+',innerHeight='+h);}
function popUpNew(Page,Width,Height,Scroll){window.open(Page,"popUpWindow",'width='+Width+',height='+Height+',toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars='+Scroll+',copyhistory=no,resizable=yes');}function reloadPage (){if (innerWidth != origWidth || innerHeight != origHeight) {location.reload();}}function changeScrollbarColor(C){if (document.all) {document.body.style.scrollbarBaseColor = C;}}function swapImage (name, source){var image;image = findDOMimage(name);image.src = source;}function setZIndex(objectName, newIndex){var refObject = findDOM(objectName,1);refObject.zIndex = newIndex;}function chgURL(frm){var url = frm.options[frm.selectedIndex].value;var ext = ".shtml";window.location.href = url + ext;}function antispam(name,domain){document.write = "mailto:" + name + "@" + domain;}function hideEmail(usr,dom,sub,dis){var user = usr;var domain = dom;var subj = sub;var display = dis;if (dis != '') {display = dis;}else{display = user + '@' + domain;}if (subj != '') {return ('<a href="mailto:'+user + '@' + domain +'?subject=' + subj + '">' + display + '</a>');}else{return ('<a href="mailto:'+user + '@' + domain + '">' + display + '</a>');}}
function nonState(){if (confirm("The link you selected points to a \n non-State of Delaware website. \n Do you want to continue?")){return 1;}else{return 0;}}function setStyle(elm, style){document.getElementById(elm).setAttribute('style', style);document.getElementById(elm).style.cssText=style;}
function setStyle(elm, style){document.getElementById(elm).setAttribute('style', style);document.getElementById(elm).style.cssText=style;}
function setClass(elm, classname){document.getElementById(elm).setAttribute('class', classname);document.getElementById(elm).setAttribute('className', classname);}
function getAttrib(elm,attrib){document.getElementById(elm).getAttribute(attrib);}
function setAttrib(elm,attrib,newvalue){document.getElementById(elm).setAttribute(attrib,newvalue);}
function setSubsites(){var sDom=location.href.toLowerCase();var sSite='';for (var i=1; i<=numSites; i++) {if(sDom.indexOf(arraySites[i])!=-1){sSite=arraySites[i];}}return sSite;}
function setFeatured(){return '<a href="'+strFeaturedLink+'"><img src="'+strFeaturedImg+'" alt="'+strFeaturedAlt+'" title="'+strFeaturedTitle+'" height="75" width="291" border="0"><\/a>';}
function setSearchOpt(){var sSOpt = '<label for="qp" title="Select the Focus of Your Search">';sSOpt = sSOpt + '<select name="qp" id="qp" class="search" tabindex="9">';sSOpt = sSOpt + '<option value="">Statewide<\/option>';sSOpt = sSOpt + '<option value="url:'+strDomain+'" selected>This Site<\/option>';sSOpt = sSOpt + '<\/select>';sSOpt = sSOpt + '<\/label>';return sSOpt;}
function setSearchReturn(){return '<input type="hidden" name="agencypage" value="'+strDomain+'"><!-- return button url -->';}
//function togFontSize(cssID,strID,strFile,strOpt){if(strOpt==1){document.getElementById(strID+'Text').onclick=function(){togFontSize(cssID,strID,strFile,2);return false;};document.getElementById(strID+'Text').title='Increase Font Size';}else{document.getElementById(strID+'Text').onclick=function(){togFontSize(cssID,strID,strFile,1); return false;};document.getElementById(strID+'Text').title='Decrease Font Size';}cssSwitch(cssID,strID,strFile,strOpt);}
function togFontSize(cssID,strID,strFile,strOpt){if(strOpt==1){document.getElementById('p4c').onclick=function(){togFontSize(cssID,strID,strFile,2);return false;};document.getElementById('p4c').title='Increase the Font Size of this Page';document.getElementById('fontToggleText').onclick=function(){togFontSize(cssID,strID,strFile,2);return false;};document.getElementById('fontToggleText').title='Increase the Font Size of this Page';}else{document.getElementById('p4c').onclick=function(){togFontSize(cssID,strID,strFile,1);return false;};document.getElementById('p4c').title='Decrease the Font Size of this Page';document.getElementById('fontToggleText').onclick=function(){togFontSize(cssID,strID,strFile,1);return false;};document.getElementById('fontToggleText').title='Decrease the Font Size of this Page';}cssSwitch(cssID,strID,strFile,strOpt);}
function cssSwitch(cssID,strID,strFile,strOpt){document.getElementById(cssID).href='/egov/portal.nsf/allfiles/files/$file/'+strFile+strOpt+'.css';}
function doPrintFriendly(){dom=location.href.toUpperCase();if(dom.indexOf("#PRINT")!=-1){cssSwitch('cssPrint','printToggle','print','2');setClass('hdrPrint','sDiv');document.getElementById('hdrPrint').innerHTML='<img src="http://www.delaware.gov/egov/portal.nsf/allfiles/images/$file/hdr_print.jpg" alt="State of Delaware">';}}
function resetTabs(pre){var lis = document.getElementsByTagName('li');for (i=0; i<lis.length; i++){if(lis[i].id.indexOf(pre)!=-1){setClass(lis[i].id,'first');}}var divs = document.getElementsByTagName('div');for (i=0; i<divs.length; i++){if(divs[i].id.indexOf(pre)!=-1){setClass(divs[i].id,'hDiv');}}}		
function setTab(pre){setClass(pre+'l','selected');setClass(pre+'t','sDiv');}	
function resetDivs(pre,style){var divs = document.getElementsByTagName('div'); for (i=0; i<divs.length; i++){if(divs[i].id.indexOf(pre)!=-1){setStyle(divs[i].id,style);}}}
function hideDivs(pre){var divs = document.getElementsByTagName('div'); for (i=0; i<divs.length; i++){if(divs[i].id.indexOf(pre)!=-1){setClass(divs[i].id,'hDiv');}}}
function togView(elm){if(document.getElementById(elm).getAttribute('class')=='sDiv'){return true;}else{return false;}}
function showItem(pre,elm){var strSrch;if(elm=='head_srch_close'){strSrch=1;elm='head_srch';}if(togView(elm)==true&&elm!='head_srch'||strSrch==1){if(elm!='head_srch'||strSrch==1){setClass(elm,'hDiv');}setLinkDefaults();}else{hideDivs(pre);setClass(elm,'sDiv');setAttrib('hdrLogo','alt','');setAttrib('hdrLogo','title','');setAttrib('hdrLogoLink','href','#');setAttrib('hdrTxtLink','href','#');setAttrib('hdrTxt','alt','');setAttrib('hdrTxt','title','');}}
//function togView(elm){if(document.getElementById(elm).getAttribute('class')=='sDiv'){return true;}else{return false;}}
//function showItem(pre,elm,src){var strSrch;if(elm=='head_srch_close'){strSrch=1;elm='head_srch';}if(togView(elm)==true){if(elm!='head_srch'||strSrch==1){setClass(elm,'hDiv');}}else{hideDivs(pre);setClass(elm,'sDiv');}}
function setLinkDefaults(){setAttrib('hdrLogoLink','href','http://www.Delaware.gov');setAttrib('hdrLogo','alt','Photo: State of Delaware');setAttrib('hdrLogo','title','State of Delaware - The Official Website of the First State');setAttrib('hdrTxtLink','href',strCreditLink);setAttrib('hdrTxt','alt',strCreditAlt);setAttrib('hdrTxt','title',strCreditTitle);}
//function chkSrch(){if(document.getElementById('srchBox').value==''||document.getElementById('srchBox').value==' Your Search...'){alert('Please Enter a Search Keyword or Phrase');showItem('head_','head_srch');document.getElementById('srchBox').focus();document.getElementById('srchBox').value='';return false;}else{return true;}}
function doSlide(elm,style,time){setTimeout(function(){setStyle(elm, style);},time);}
function doSlideStyle(elm,style,time){setTimeout(function(){setStyle(elm,style);},time);}
function doSlideClass(elm,classname,time){setTimeout(function(){setClass(elm,classname);},time);}
function slideTray(elm){if(sliderActive!=elm || sliderStart){var strDn=300;var strUp=0;var intPos=elm.substr(3,1);sliderStart=false;setClass(sliderActive+'_a','sDiv');for(i=30; i<=180; i+=30){strDn-=50;strUp+=50;doSlideStyle(sliderActive,'height:'+strDn+'px;visibility:visible;display:block;overflow:hidden;',i);if(elm=='ot_7' && strUp==300){doSlideStyle(elm,'height:295px;visibility:visible;display:block;overflow:hidden;',i);doSlideStyle('o_7','height:30px;',i);}else{doSlideStyle(elm,'height:'+strUp+'px;visibility:visible;display:block;overflow:hidden;',i);doSlideStyle('o_7','height:25px;',i);}}sliderActive=elm.toString();setClass(sliderActive,'sliderOpen');setClass(sliderActive+'_a','hDiv');setSlider(intPos);}}
function setSlider(intPos){for(x=1; x<intPos; x++){setStyle('ot_'+x+'_a','position:relative;right:4px;float:right;top:-1px;height:16px;width:17px;background-image:url("/egov/portal.nsf/allfiles/images/$file/arrowS.gif");background-repeat: no-repeat; background-position: top right;');}for(y=intPos; y<=7; y++){setStyle('ot_'+y+'_a','position:relative;right:4px;float:right;top:-1px;height:16px;width:17px;background-image:url("/egov/portal.nsf/allfiles/images/$file/arrowS.gif");background-repeat: no-repeat; background-position: top left;');}}
function setMM(elm,dir,intH){var strH;var strDir;var arrayTiming=new Array(15);arrayTiming[1]=80;arrayTiming[2]=160;arrayTiming[3]=240;arrayTiming[4]=260;arrayTiming[5]=280;arrayTiming[6]=300;arrayTiming[7]=320;arrayTiming[8]=340;arrayTiming[9]=420;arrayTiming[10]=500;arrayTiming[11]=620;arrayTiming[12]=760;arrayTiming[13]=920;arrayTiming[14]=1100;arrayTiming[15]=1200;mmH=intH;if(dir=='l'){strDir='-';}else{strDir='';}for(m=1; m<=14; m++){mmH+=63;doSlideStyle(elm,'background-position:'+strDir+mmH+'px 0px;',arrayTiming[m]);}return mmH;}
function slideMM(type,elm,mmset){switch(type){case 'p':intH_p=(setMM(elm,mmset,intH_p)-1);if(bolSet_p==1){bolSet_p=2;document.getElementById('mmg_p_img').useMap='#mmg_p_map2';}else{bolSet_p=1;document.getElementById('mmg_p_img').useMap='#mmg_p_map1';}break;case 'v':intH_v=(setMM(elm,mmset,intH_v)-1);if(bolSet_v==1){bolSet_v=2;document.getElementById('mmg_v_img').useMap='#mmg_v_map2';}else{bolSet_v=1;document.getElementById('mmg_v_img').useMap='#mmg_v_map1';}break;case 'a':intH_a=(setMM(elm,mmset,intH_a)-1);if(bolSet_a==1){bolSet_a=2;document.getElementById('mmg_a_img').useMap='#mmg_a_map2';}else{bolSet_a=1;document.getElementById('mmg_a_img').useMap='#mmg_a_map1';}break;case 't':intH_t=(setMM(elm,mmset,intH_t)-1);if(bolSet_t==1){bolSet_t=2;document.getElementById('mmg_t_img').useMap='#mmg_t_map2';}else{bolSet_t=1;document.getElementById('mmg_t_img').useMap='#mmg_t_map1';}break;}}
function getFlashVer(){var version=0;var e;var tmp;var tmpArray;try{if(navigator.appVersion.indexOf("MSIE")!=-1 && navigator.userAgent.indexOf("Opera")==-1){var axo;axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");tmpArray=axo.GetVariable("$version").split(" ");tmp=tmpArray[1].indexOf(',');version = tmpArray[1].substr(0,tmp);}else if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]){tmpArray=navigator.plugins["Shockwave Flash"].description.split(" ");tmp=tmpArray[2].indexOf('.');version = tmpArray[2].substr(0,tmp);}}catch(e){}return version;}
function setFlash(elm,strFlash,strAltImg,strAltLink){if(getFlashVer()>=7 && strFlash!='00'){document.getElementById(elm).innerHTML='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="450" height="318" id="'+strFlash+'" align="middle" title="Spotlights from Delaware.gov"><param name="allowScriptAccess" value="sameDomain"><param name="movie" value="/egov/portal.nsf/allfiles/files/$file/'+strFlash+'.swf"><param name="quality" value="high"><param name="bgcolor" value="#333333"><embed src="/egov/portal.nsf/allfiles/files/$file/'+strFlash+'.swf" quality="high" bgcolor="#333333" width="450" height="318" name="'+strFlash+'" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" title="Spotlights from Delaware.gov"><\/object>';}else{document.getElementById(elm).innerHTML='<a href="'+strAltLink+'"><img src="/egov/portal.nsf/allfiles/images/$file/'+strAltImg+'.jpg" alt="Image:Alt Flash Content" border="0"><\/a>';}}
function chkSrch(){if(document.getElementById('srchBox').value==''||document.getElementById('srchBox').value==' Your Search...'){alert('Please Enter a Search Keyword or Phrase');showItem('head_','head_srch');document.getElementById('srchBox').focus();document.getElementById('srchBox').value='';return false;}else{document.getElementById('hdrSrchForm').action='http://search.delaware.gov/search';return true;}}
function jsLink(url){window.location=url;}
//function keyClose(ev){try{var strKey=event.keyCode;}catch(e){if(e.message){var strKey=ev.keyCode;}}if(strKey==27){hideDivs('head_');setLinkDefaults();}}
function splitTxt(str,start,end){var pos = str.indexOf(start);return str.substring(pos+start.length,str.indexOf(end));}
function getHoliday(){var strHolStart='<p>State offices will be closed ';var strHolMid=', in observance of ';var strHolEnd='.</p>';var strCurHol=checkHoliday();if(strCurHol.length>92){var strHolTitle=splitTxt(strCurHol,'<strong>Holiday Notice:&nbsp; ','</strong>');var strHolDate=splitTxt(strCurHol,'The office will be closed ',', in observance');document.getElementById('hol').innerHTML=strHolStart+strHolDate+strHolMid+strHolTitle+strHolEnd;}}
function myRandom(){return ""+new Date().getTime()+Math.random();}
function getPhotos(){document.getElementById('mmg_flickr').src='http://portal.delaware.gov/photos/flickr.htm?nocache='+myRandom();}
function keyClose(ev){try{var strKey=event.keyCode;}catch(e){if(e.message){var strKey=ev.keyCode;}}if(strKey==27){hideDivs('head_');hideDivs('modal_');hideDivs('overlay');setClass('sp','sDiv');setLinkDefaults();}}
function doSlideModal(elm,h,w,time,maxW){var strTop=((document.documentElement.clientHeight/2)-(h/2))+getScrollXY();var strLeft=((getPageWidth()-w)/2);if(maxW==99){setStyle(elm,'top:'+strTop+'px;'+'left:'+strLeft+'px;');setClass(elm,'box'+w+' sDiv');}else{setTimeout(function(){if(maxW==1){setClass(elm,'box'+w+' sDiv');}else{setClass(elm,'box'+w);}setStyle(elm,'top:'+strTop+'px;'+'left:'+strLeft+'px;');},time);}}
function getScrollXY(){var scrOfX = 0, scrOfY = 0;if( typeof( window.pageYOffset ) == 'number' ) {scrOfY = window.pageYOffset;scrOfX = window.pageXOffset;}else if( document.body && (document.body.scrollLeft || document.body.scrollTop)){scrOfY = document.body.scrollTop;scrOfX = document.body.scrollLeft;}else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop)){scrOfY = document.documentElement.scrollTop;scrOfX = document.documentElement.scrollLeft;}return (scrOfY);}
function showModal(pre,elm){if(togView(elm)==true){doSlideModal(elm,'480','200',100);doSlideClass(elm+'_cont','hDiv',200);doSlideModal(elm,'480','100',250);doSlideModal(elm,'480','10',300);doSlideModal(elm,'480','0',340);doSlideClass(elm,'hDiv',350);doSlideClass('overlay','hDiv',350);doSlideClass('sp','sDiv',375);}else{hideDivs(pre);setClass('sp','hDiv');setStyle('overlay','width:'+getPageWidth()+'px;height:'+getPageHeight()+'px;');doSlideClass('overlay','sOverlay30',50);doSlideClass('overlay','sOverlay50',100);doSlideClass('overlay','sOverlay70',150);setClass(elm+'_cont','modal_cont_visible');doSlideModal(elm,'480','0',500);doSlideModal(elm,'480','10',600);doSlideModal(elm,'480','100',850);doSlideModal(elm,'480','200',900);doSlideModal(elm,'480','740',1050,1);}}
function closeModal(){hideDivs('modal_');hideDivs('overlay');setClass('sp','sDiv');}
function getPageWidth(){if(document.body.clientWidth>=document.body.scrollWidth){return document.body.clientWidth;}else{return document.body.scrollWidth;}}
function getPageHeight(){if(document.body.clientHeight>=document.body.scrollHeight){return document.body.clientHeight;}else{return document.body.scrollHeight;}}
//function setiFrame(id,file){document.getElementById(id).src='http://dosgicsv10.gic.dos.state.de.us/portal/tabFrames/'+file+'?nocache='+myRandom();}
function setiFrame(id,file){document.getElementById(id).src='http://portal.delaware.gov/tabFrames/'+file+'?nocache='+myRandom();}
function toggleWall(){if(strWall==''){strWall=2;}else{strWall='';}return strWall;}
//####### Website #######
//The following sets the Focus for the Search this Site option.
//Only change subsite options if needed
strDomain='http://delaware.gov/egov/portal.nsf/portal/';
numSites = 1;
arraySites = new Array(numSites);
arraySites[1]=''

//####### Show/Hide Page Options #######
//Setting one of the following options to false will hide the item
bolPhone=true;
bolMobile=true;
bolHelp=true;
bolSize=true;
bolPrint=true;
bolEmail=true;

//####### Header Images #######
//Setting one of the following options will override the default values
strHeaderImg=''; //Path to center Header image - all Header images must be created by the GIC
strCreditImg=''; //Path to right-side Photo Name Credit image
strCreditAlt='Photo: Featured Delaware Photo'; //Alt text for Photo Name Credit Image
strCreditTitle='Featured Delaware Photo'; //Title text for Photo Name Credit Image

//####### Header Links #######
//Setting one of the following options will override the default values
strCreditLink='http://www.delaware.gov/egov/portal.nsf/portal/multimediaphotos'; //URL for Photo Name Credit Image
strPhoneLink='http://phonedirectory.delaware.gov/'; //URL for Mobile option
strMobileLink='http://mobile.delaware.gov/'; //URL for Mobile option
strHelpLink='http://portal.delaware.gov/help/'; //URL for Help option
strEmailLink=''; //URL for Email a Friend option

// End Javascript -->