﻿<!-- Hide me from ye olde browsers

//-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
function openWindowToolbar(url,x,y)
{
   l = Math.round((screen.width - x) / 2);
   t = Math.round((screen.height - y) / 2);
   w = window.open(url,'popup','scrollbars=yes,status=no,top=' + t + ',left=' + l + ',width=' + x + ',height=' + y + ',toolbar=no,menubar=yes,resizable=yes');
   w.focus();
}

//-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
function openWindowFlags(url,x,y,flags)
{
   l = Math.round((screen.width - x) / 2);
   t = Math.round((screen.height - y) / 2);
   w = window.open(url,'popup','top=' + t + ',left=' + l + ',width=' + x + ',height=' + y + ',' + flags);
   w.focus();
}

//-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
function openWindow(url,x,y)
{
   l = Math.round((screen.width - x) / 2);
   t = Math.round((screen.height - y) / 2);
   w = window.open(url,'popup','scrollbars=yes,status=no,top=' + t + ',left=' + l + ',width=' + x + ',height=' + y + ',toolbar=no,resizable=yes');
   w.focus();
}

//-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
function openWindow1(url,winname,x,y)
{
   l = Math.round((screen.width - x) / 2);
   t = Math.round((screen.height - y) / 2);
   w = window.open(url,winname,'scrollbars=yes,status=no,top=' + t + ',left=' + l + ',width=' + x + ',height=' + y + ',toolbar=no,resizable=yes');
   w.focus();
}

//-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
function openWindowPos(url,winname,x,y,t,l)
{
   l = Math.round((screen.width - x) / 2);
   t = Math.round((screen.height - y) / 2);
   w = window.open(url,winname,'scrollbars=yes,status=no,top=' + t + ',left=' + l + ',width=' + x + ',height=' + y + ',top=' + t + ',left=' + l + ',toolbar=no,resizable=no');
   w.focus();
}

//-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
function deactivateLinks()
{

for (var i = 0; i < document.links.length; i++) {
    //alert(document.links[i].href);
     if (document.links[i].href != "javascript:window.print();") {
        document.links[i].href="javascript:void(0)";
        document.links[i].target="";
     }
   }

for (var f=0; f < document.forms.length; f++) {
for (var i=0; i < document.forms[f].elements.length; i++) {

     //alert(document.forms[f].elements[i].type);

	 if ( (document.forms[f].elements[i].type == "select-one") || (document.forms[f].elements[i].type == "radio") || (document.forms[f].elements[i].type == "button") || (document.forms[f].elements[i].type == "submit") ) {
	   	if ( (document.forms[f].elements[i].value != "Print") && (document.forms[f].elements[i].value != "Close") ) {
		 	document.forms[f].elements[i].disabled = true;
		}
	 }

     if (document.forms[f].elements[i].type == "select-one") {
       var lst = document.forms[0].elements[i];
       lst.disabled = true;
       /*
       for (var j=0; j < lst.options.length; j++) {
           lst.options[j].value="#";
       }
       */
     }
   }
   }
   
   
}

//-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
function MM_findObj(n, d) { //v3.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}

//-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

//-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

//-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
function MM_preloadImages() { //v3.0
 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
   var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
   if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}


function TransportSelect_onchange(obj) {
    pos = location.href.indexOf("&mode=");
    if (pos > -1) {
        u = location.href.substr(0,pos);
    } else {
        u = location.href
    }
    u = u + "&mode=" + obj[obj.selectedIndex].value.toLowerCase();
    //alert("u=" + u);
    location.href = u;
}

function TransportSelect_dochange(obj) {
    document.getElementById("car1").className="transportItemHidden";
    document.getElementById("bus1").className="transportItemHidden";
    document.getElementById("train1").className="transportItemHidden";
    document.getElementById("map1").className="transportItemHidden";
    document.getElementById("car2").className="transportItemHidden";
    document.getElementById("bus2").className="transportItemHidden";
    document.getElementById("train2").className="transportItemHidden";
    document.getElementById("map2").className="transportItemHidden";
    //alert(obj.name);
    //alert(obj.id);
    //alert(obj[obj.selectedIndex].value);
    document.getElementById(obj[obj.selectedIndex].value+"1").className="transportItem1Visible";
    document.getElementById(obj[obj.selectedIndex].value+"2").className="transportItem2Visible";
    
    document.images("map").src = "images/transport_" + obj[obj.selectedIndex].value + ".jpg";
    document.images("icon").src = "images/img_icon_con_" + obj[obj.selectedIndex].value + ".gif";
}

//Generating Pop-up Print Preview page
function getPrint(print_area,x,y)
{	
    l = Math.round((screen.width - x) / 2);
    t = Math.round((screen.height - y) / 2);
    
	//Creating new page
	//var pp = window.open('','popup','scrollbars=yes,status=no,top=' + t + ',left=' + l + ',width=' + x + ',height=' + y + ',toolbar=no,resizable=yes');
	var pp = window.open('','popup','scrollbars=yes,status=yes,top=' + t + ',left=' + l + ',width=' + x + ',height=' + y + ',toolbar=no,menubar=yes,resizable=yes');
	//Adding HTML opening tag with <HEAD> … </HEAD> portion 
	pp.document.writeln('<HTML><HEAD><title>Print Preview</title><LINK href=stylesheet.css  type="text/css" rel="stylesheet"><script src="scripts_global.js" type="text/javascript"></script><script src="swfobject.js" type="text/javascript"></script>')
	pp.document.writeln('<style type="text/css"> .hidebutton { visibility:hidden } </style><LINK href=print.css  type="text/css" rel="stylesheet" media="print"><base target="_self"></HEAD>')
	//Adding Body Tag
	pp.document.writeln('<body onload="alert();window.print();" _MS_POSITIONING="GridLayout" bottomMargin="10" leftMargin="10" topMargin="10" rightMargin="10">');
    //pp.document.writeln('<script>function WebForm_DoPostBackWithOptions() { alert("here"); void(0); } function window.onload() { __doPostBack = WebForm_DoPostBackWithOptions; }</script>');
	//Adding form Tag
	pp.document.writeln('<form  method="post">');
	//Creating two buttons Print and Close within a table
	pp.document.writeln('<TABLE width=100%><TR><TD></TD></TR><TR><TD align=right><INPUT ID="PRINT" type="button" value="Print" onclick="javascript:location.reload(true);window.print();"><!--<INPUT ID="CLOSE" type="button" value="Close" onclick="window.close();">--></TD></TR><TR><TD></TD></TR></TABLE>');
	//Writing print area of the calling page
	pp.document.writeln(document.getElementById(print_area).innerHTML);
	//Ending Tag of </form>, </body> and </HTML>
	pp.document.writeln('</form></body><script>deactivateLinks();</script></HTML>');	
	pp.focus();		
	//pp.print();
}	
//-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

function openImageWindow(uedID) {
    var w = window.open("imageselect.aspx?uedID=" + uedID,"fileselect","height=400,width=600,scrollbars=yes,status=yes");
}

function openFileWindow(uedID) {
    var w = window.open("fileselect.aspx?uedID=" + uedID,"fileselect","height=400,width=600,scrollbars=yes,status=yes");
}

function insertImage2(fn,alt,uedID) {
    UltimateEditors[uedID].StoreCurrentRange(); 
    ftype = fn.substr(fn.lastIndexOf('.')+1,(fn.length - fn.lastIndexOf('.') - 1));
  
    if (ftype.toUpperCase()=="SWF") {
/*    
       htmlStr = "<div id='" + alt + "' width='100%'><p>Flash File: 'contentimages/" + fn + "'<br>";
       htmlStr = htmlStr + "You need to install Flash<br><a href='http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash' target='_blank'><img src='../images/get_shockwave_player.gif' border=0></a></p></div>";
       htmlStr = htmlStr + "<script type='text/javascript'>";
       htmlStr = htmlStr + "var so = new SWFObject('contentimages/" + fn + "', '" + alt + "', '100%', '100%', '9', '#ECEAEB');";
       htmlStr = htmlStr + "so.write('" + alt + "');";
       htmlStr = htmlStr + "<\/script> ";    
*/       
       htmlStr = "";
       htmlStr = "<p style=''>Flash File: 'contentimages/" + fn + "' playing at 400px wide x 300px high<br>";
       htmlStr = htmlStr + "<script type='text/javascript'>";
       htmlStr = htmlStr + "ContentFlash('contentimages/" + fn + "', '" + alt + "', '400', '300');";
       htmlStr = htmlStr + "<\/script></p>";    
       UltimateEditors[uedID].InsertHTML(htmlStr);
    } else if (ftype.toUpperCase()=="PDF") {
       //htmlStr = "<a href='../contentimages/" + fn + "' target='_blank'>" + alt + "<img src='../images/ecblank.gif' border=0 width=10 height=1><img src='../images/pdf.gif' border=0 align=absmiddle></a>";
       htmlStr = "<a href='../contentimages/" + fn + "' target='_blank'>" + alt + "</a>";
       UltimateEditors[uedID].InsertText(htmlStr);
    } else {
       htmlStr = "<img src='../contentimages/" + fn + "' alt='" + alt + "' border=0 oncontextmenu='return false'>";
       UltimateEditors[uedID].InsertText(htmlStr);
    }
}

function insertFile2(fn,alt,uedID) {
    UltimateEditors[uedID].StoreCurrentRange(); 
    //htmlStr = "<a href='../contentimages/PDF/" + fn + "' target='_blank'>" + alt + "<img src='../images/ecblank.gif' border=0 width=10 height=1><img src='../images/pdf.gif' border=0 align=absmiddle></a>";
    htmlStr = "<a href='../contentimages/PDF/" + fn + "' target='_blank'>" + alt + "</a>";
    UltimateEditors[uedID].InsertText(htmlStr);
}

function insertPageAnchor(uedID) {
    //alert('insertPageAnchor');
    UltimateEditors[uedID].StoreCurrentRange(); 
    var htmlStr = prompt('Please enter Anchor Name. NO BLANKS:', 'AnchorName');
/*    
    do {
        var htmlStr = prompt('Please enter Anchor Name. NO BLANKS OR SPECIAL CHARACTERS:', 'AnchorName');
        pos = escape(htmlStr).indexOf('%');
        if (pos == -1) break;
    } while (true);
*/    
    htmlStr = "<a name='" + escape(htmlStr) + "'>";
    UltimateEditors[uedID].InsertText(htmlStr);    
}


function linkPageAnchor(uedID) {
    win = window.open("pageAnchorSelect.htm?ueid="+uedID+";", "Window3", "width=320,height=210");  
}

function linkContent1of2(uedID) {
    var w = window.open("selectContentLink.aspx?uedID=" + uedID,"linkselect","height=600,width=800,scrollbars=yes,status=no");
}

function linkContent2of2(uedID,url,isrollover,b1,b2,ispopup,width,height,popupstr) {
    var editorObj = UltimateEditors[uedID];
    UltimateEditors[uedID].StoreCurrentRange(); 

    if (ispopup) {
        hrefstr = "href=javascript:openWindowFlags('" + url + "'," + width + "," + height + ",'" + popupstr + "')";
    } else {
        hrefstr = "href='" + url + "'";        
    }

    //var htmlStr = "<A onmouseover=\"document.images['" + b1 + "'].src='contentimages/" + b2 + "';\" onmouseout=\"document.images['" + b1 + "'].src='contentimages/" + b1+ "';\" href=\"" + urlstr + "\"><IMG src=\"../contentimages/" + b1 + "\" border=0 name=\"" + b1 + "\"></A>";
    
    if (isrollover) {
        htmlStr = "<a " + hrefstr + " onmouseover=\"document.images['" + b1 + "'].src='contentimages/" + b2 + "';\" onmouseout=\"document.images['" + b1 + "'].src='contentimages/" + b1+ "';\"><IMG src=\"../contentimages/" + b1 + "\" border=0 name=\"" + b1 + "\" oncontextmenu='return false'></a>";
    } else {
        htmlStr = "<a " + hrefstr + ">" + editorObj.ue8t.htmlText + "</a>";        
    }

/*
    if (ispopup) {
        htmlStr = "<a href=javascript:openWindowFlags('" + htmlStr + "'," + width + "," + height + ",'" + popupstr + "')>" + editorObj.ue8t.htmlText + "</a>";
    } else {
        htmlStr = "<a href='" + htmlStr + "'>" + editorObj.ue8t.htmlText + "</a>";        
    }
*/

    UltimateEditors[uedID].InsertHTML(htmlStr);    
}

function linkPopup(uedID) {
    var editorObj = UltimateEditors[uedID];
    UltimateEditors[uedID].StoreCurrentRange(); 
    var htmlStr = prompt('Please enter URL:', 'http://');
    htmlStr = "<a href=javascript:openWindowFlags('" + htmlStr + "',800,600,'scrollbars=yes,status=yes,toolbar=yes,menubar=yes,resizable=yes')>" + editorObj.ue8t.htmlText + "</a>";
    UltimateEditors[uedID].InsertHTML(htmlStr);    
}

function openImagePopupWindow() {
    var w = window.open("imagePopupselect.aspx","imagePopupselect","height=400,width=600,scrollbars=yes,status=yes");
}

function insertImage(s) {
    
    UltimateEditors[editID].StoreCurrentRange(); 
    var htmlStr = "<img src='images/" + s + "' alt='alt tag' _align=right oncontextmenu='return false'>";
    //var htmlStr = "<a href='images/" + s + "'>" + s + "</a>";
    UltimateEditors[editID].InsertHTML(htmlStr);
}

function insertFile(s) {
    //var altTag = prompt('Please enter the alt text for the image',s);
    UltimateEditors[editID].StoreCurrentRange(); 
    //var htmlStr = "<img src='images/" + s + "' alt='" + altTag + "'>";
    var htmlStr = "<a href='pdf/" + s + "'>" + s + "</a>";
    UltimateEditors[editID].InsertHTML(htmlStr);
}

function insertImagePopup(s, altTag) {
    
    UltimateEditors[editID].StoreCurrentRange(); 
    var htmlStr = "<a href=javascript:openWindow('imagePopup.aspx?image=" + s + "',400,400)><img src='images/" + s + "' border=0 vspace=0 hspace=0 alt='" + altTag + "' oncontextmenu='return false'></a>";
    //var htmlStr = "<a href='images/" + s + "'>" + s + "</a>";
    UltimateEditors[editID].InsertHTML(htmlStr);
}

function openRolloverButtonWindow(uedID) {
    var w = window.open("rolloverbuttonselect.aspx?uedID=" + uedID,"rolloverbuttonselect","height=400,width=600,scrollbars=yes,status=yes");
}

function insertRolloverButton(uedID, b1, b2, urlstr) { 
    UltimateEditors[uedID].StoreCurrentRange(); 
    //var htmlStr = "<A onmouseover=""document.images['" + b1 + "'].src='images/" + b2 + "';"" onmouseout=""document.images['" + b1 + "'].src='images/" + b1 + "';"" href=""" + urlStr + """>"
    //htmlStr &= "<IMG src="""+ b1 + """ border=0 name=" + b1 + "></A>";
    var htmlStr = "<A onmouseover=\"document.images['" + b1 + "'].src='contentimages/" + b2 + "';\" onmouseout=\"document.images['" + b1 + "'].src='contentimages/" + b1+ "';\" href=\"" + urlstr + "\"><IMG src=\"../contentimages/" + b1 + "\" border=0 name=\"" + b1 + "\" oncontextmenu='return false'></A>";
    UltimateEditors[uedID].InsertHTML(htmlStr);
}

function insertExpandContract(uedID) {
var htmlstr = "<h2>Expandable content section</h2>";
htmlstr = htmlstr + "<div><p><a href=\"javascript:bobexample.sweepToggle('contract')\">Contract All</a> | <a href=\"javascript:bobexample.sweepToggle('expand')\">Expand All</a></p></div>";
htmlstr = htmlstr +  "<h3 id=\"bobcontent1-title\" class=\"handcursor\">Title 1</h3>";
htmlstr = htmlstr +  "<div id=\"bobcontent1\" class=\"switchgroup1\">";
htmlstr = htmlstr +  "<p>Overtype with your paragraph here</p></div>";
htmlstr = htmlstr +  "<h3 id=\"bobcontent2-title\" class=\"handcursor\">Title 2</h3>";
htmlstr = htmlstr +  "<div id=\"bobcontent2\" class=\"switchgroup1\">";
htmlstr = htmlstr +  "<p>Overtype with your paragraph here</p></div>";
htmlstr = htmlstr +  "<h3 id=\"bobcontent3-title\" class=\"handcursor\">Title 3</h3>";
htmlstr = htmlstr +  "<div id=\"bobcontent3\" class=\"switchgroup1\">";
htmlstr = htmlstr +  "<p>Overtype with your paragraph here</p></div>";
htmlstr = htmlstr +  "<script type=\"text/javascript\"> ";
htmlstr = htmlstr +  "var bobexample=new switchcontent(\"switchgroup1\", \"div\"); ";
htmlstr = htmlstr +  "bobexample.setStatus('<img src=\"images/collapse.gif\"  oncontextmenu=\"return false\" /> ', '<img src=\"images/expand.gif\" oncontextmenu=\"return false\" /> '); ";
htmlstr = htmlstr +  "bobexample.setColor('darkred', 'black'); ";
htmlstr = htmlstr +  "bobexample.setPersist(true); ";
htmlstr = htmlstr +  "bobexample.collapsePrevious(true); ";
htmlstr = htmlstr +  "bobexample.init(); ";
htmlstr = htmlstr +  "<\/script>";

UltimateEditors[uedID].StoreCurrentRange(); 
UltimateEditors[uedID].InsertHTML(htmlstr);
}

function QTMovie(mfile) {
document.write("<OBJECT codeBase='http://www.apple.com/qtactivex/qtplugin.cab' width=240 height=145 classid=clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B>");
document.write("<param name='src' value='" + mfile + "'>");
document.write("<param name='autoplay' value='false'>");
document.write("<param name='controller' value='true'>");
document.write("<param name='loop' value='true'>");
document.write("<EMBED src='" + mfile + "' width='240' height='145' autoplay='false' controller='true' loop='true' pluginspage='http://www.apple.com/quicktime/download/'>");
document.write("</EMBED></OBJECT>");
}

function toggleDetails(elementId) {

divs = document.getElementsByTagName("div");
idArray = new Array();
 
    for (x=0; x<divs.length; x++) {
        if (divs[x].className=="employmentdetail") {
           divs[x].style.display = 'none';
        }
    }
    
    
var element = document.getElementById(elementId);
      
if (element.style.display == '')
   element.style.display = 'none';
else
   element.style.display = ''; 
}

function ContentFlash(swf,id,w,h) {
    //var hasReqestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
    var hasReqestedVersion = DetectFlashVer(6, 0, 0);

    // Check to see if the version meets the requirements for playback
    if (hasReqestedVersion) {
	    // if we've detected an acceptable version
	    // embed the Flash Content SWF when all tests are passed
	    AC_FL_RunContent(
				    "src", swf,
				    "width", w,
				    "height", h,
				    "align", "l",
				    "salign", "l",
				    "id", id,
				    "quality", "high",
				    "bgcolor", "#ECEAEB",
				    "name", id,
				    "allowScriptAccess","sameDomain",
				    "type", "application/x-shockwave-flash",
				    'codebase', 'http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab',
				    "pluginspage", "http://www.adobe.com/go/getflashplayer"
	    );
    } else {  // flash is too old or we can't detect the plugin
	    var alternateContent = ''
	    + 'This content requires the Adobe Flash Player. '
	    + '<a href=http://www.adobe.com/go/getflash/>Get Flash</a>';
	    document.write(alternateContent);  // insert non-flash content
    }
}
    
//-->