if(top.frames.length>0 && self!=top){document.location.href='framecatcher.htm'}

MouseMoveTaskArray = new Array();
MouseUpTaskArray = new Array();
ValidationFieldsArray = new Array();

BaseWindowWidth = 900
doPageFrefreshAfterMessageCloses = false

var IE = navigator.appName.indexOf('Microsoft')>-1?true:false
if(!IE){document.addEventListener("mousemove", function(event) { trackMouse(event); }, false);}
else{document.onmousemove = trackMouse;}  
document.onmouseup=DoMouseupTasks

Array.prototype.removeByValue = function(val) {
    for(var i=0; i<this.length; i++) {
        if(this[i] == val) {
            this.splice(i, 1);
            break;
        }
    }
}

Array.prototype.addValue = function(val) {
    this.removeByValue(val)
    this[this.length] = val;
}

Array.prototype.indexOf = function(val) {
    for(var i=0; i<this.length; i++) {
        if(this[i] == val) {
            return i;
            break;
        }
    }
    return -1;
}

//_________________________________________________________________
function DetectFlash(){
    FlashInstalled = true
    try{obj = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}
    catch(e){
        try{obj = navigator.mimeTypes["ShockwaveFlash.ShockwaveFlash"]}
        catch(e){FlashInstalled = false}
    }
}
DetectFlash();
//FlashInstalled = false//forces image to be the GIF image
if(FlashInstalled){PleaseWaitObj = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="50" height="50" id="pleasewait" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="movie" value="images/pleasewait.swf" /><PARAM NAME="WMode" VALUE="Transparent"/><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><embed src="images/pleasewait.swf" quality="high" wmode="transparent" width="50" height="50" name="pleasewait" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>'}
else{
    WaitImage = new Image()
    WaitImage.src = 'images/pleasewait.gif';
    PleaseWaitObj = '<img src="images/pleasewait.gif" name="PleaseWaitImage">'
}


document.write('<script language="javascript" src="js/script_xmlfunctions.js"></script>')
document.write('<div ID="MessageLayer"       style="font-family: Arial, Helvetica, sans-serif;padding:10px;z-index:201;position:absolute;visibility:hidden;border-style:solid;border-color:#000088;border-width:1px;background-image:url(images/bg_controltable.png);background-color:#F5F5FF;color:#000000;overFlow-y:auto;overflow-x:hidden;width:620px;"></div>')
document.write('<div ID="MessageShadowDiv"   style="z-index:200;position:absolute;visibility:hidden;color:#FFFFFF;"><img src="js/bg_shadow.png" name="MessageShadowImage"></div>')
document.write('<div ID="echoDiv"            style="font-family: Tahoma;padding:10px;z-index:301;padding:5px;position:absolute;border:solid 000088 1px;background-color:#012567;visibility:hidden;z-index:1000;color:#000000;" ></div>')
document.write('<div ID="EchoShadowDiv"      style="z-index:300;position:absolute;visibility:hidden;"><img src="js/bg_shadow.png" name="EchoShadowImage"></div>')
document.write('<div ID="PageOverlay"        style="font-family: arial;padding:10px;z-index:200;position:absolute;visibility:hidden;border:solid black 1px;color:#FFFFFF;background-image:url(images/bg_overlay.png);"></div>')
DropShadowDist = '10'
BorderRadius = '18'
DropShadowOpacity = '.3'
document.write('<div ID="AjaxFormLayer"      style="overflow:auto;font-family: Tahoma;padding:10px;z-index:101;position:absolute;visibility:hidden;border-style:solid;border-color:##000088;border-width:2px;background-image:url(images/bg_ajaxform.png);color:#FFFFFF;-khtml-box-shadow:rgba(0,0,160,' + DropShadowOpacity + ') 0px ' + DropShadowDist+ 'px ' + DropShadowDist * 2.5  + 'px;-moz-box-shadow:rgba(0,0,160,' + DropShadowOpacity + ') 0px ' + DropShadowDist + 'px ' + DropShadowDist * 2.5  + 'px;box-shadow:rgba(0,0,160,' + DropShadowOpacity + ') 0px ' + DropShadowDist + 'px ' + DropShadowDist * 2.5 + 'px;-moz-border-radius:' + BorderRadius + 'px;-webkit-border-radius:' + BorderRadius + 'px;-opera-border-radius:' + BorderRadius + 'px;-khtml-border-radius:' + BorderRadius + 'px;border-radius:' + BorderRadius + 'px;"></div>')
document.write('<div ID="AjaxFormShadowDiv"  style="z-index:100;position:absolute;visibility:hidden;color:#FFFFFF;border-radius:18px;"><img src="js/bg_shadow_large.png" name="AjaxShadowImage"></div>')
document.write('<div ID="AdminNote"          style="font-family: Tahoma;padding:10px;z-index:101;position:absolute;visibility:hidden;border-style:solid;border-color:##000088;border-width:2px;background-image:url(images/bg_specnote.png);color:#FFFFFF;-khtml-box-shadow:rgba(190,0,0,' + DropShadowOpacity + ') 0px ' + DropShadowDist + 'px ' + DropShadowDist + 'px;-moz-box-shadow:rgba(190,0,0,' + DropShadowOpacity + ') 0px ' + DropShadowDist + 'px ' + DropShadowDist + 'px;box-shadow:rgba(190,0,0,' + DropShadowOpacity + ') 0px ' + DropShadowDist + 'px ' + DropShadowDist + 'px;-moz-border-radius:' + BorderRadius + 'px;-webkit-border-radius:' + BorderRadius + 'px;-opera-border-radius:' + BorderRadius + 'px;-khtml-border-radius:' + BorderRadius + 'px;border-radius:' + BorderRadius + 'px;"></div>')
document.write('<div ID="AdminNoteShadowDiv" style="z-index:100;position:absolute;visibility:hidden;color:#FFFFFF;border-radius:18px;"><img src="js/bg_shadow_large.png" name="AdminNoteShadowImage"></div>')

function DoMouseupTasks(){
    for(ArrayTask in MouseUpTaskArray){eval(MouseUpTaskArray[ArrayTask])}

}

//_________________________________________________________________
function trackMouse(e){
	if(document.body){
		if (IE) {MouseYPos = event.clientY; MouseXPos = event.clientX;} 
		else    {MouseYPos = e.pageY;       MouseXPos = e.pageX;}
		RealMouseYPos = MouseYPos + GetScrollTop()
            
		RealMouseXPos = MouseXPos + GetScrollLeft()
	}
    for(ArrayTask in MouseMoveTaskArray){eval(MouseMoveTaskArray[ArrayTask])}
}


//
function CheckMaxLength(fieldObj,paramMaxLen){
	if(fieldObj.value.length>paramMaxLen){fieldObj.value = fieldObj.value.substring(0,paramMaxLen);}
}

//_________________________________________________________________
function msover(CallingImage){
	CallingImage.src = CallingImage.src.indexOf('_2.')==-1 ? CallingImage.src.replace('_1.','_2.') : CallingImage.src.replace('_2.','_1.');
	CallingImage.src = CallingImage.src.indexOf('_ON.')==-1 ? CallingImage.src.replace('_OFF.','_ON.') : CallingImage.src.replace('_ON.','_OFF.');
}

function msoff(CallingImage){
	CallingImage.src = CallingImage.src.indexOf('_1.')==-1 ? CallingImage.src.replace('_2.','_1.') : CallingImage.src
	CallingImage.src = CallingImage.src.indexOf('_OFF.')==-1 ? CallingImage.src.replace('_ON.','_OFF.') : CallingImage.src
}

//_________________________________________________________________
function ShowMessage(MessageHTML){
	document.getElementById('MessageLayer').innerHTML = '<div style="position:absolute;right:10px;"><img src="images/button_closeX.png" onclick="CloseMessage();" alt="Click to close this window" style="margin-right:-8px;margin-top:-8px;cursor:pointer;"/></div><div style="padding:0px 24px 0px 0px;">' + MessageHTML  + '</div><br clear="all"><br><div style="text-align:center;"><a href="javascript:CloseMessage();" style="color:#4444AA;font-style:italic;">Close this message</a></div>';
	
	document.getElementById('MessageLayer').style.top = 100 + GetScrollTop() + 'px' 
	document.getElementById('MessageLayer').style.visibility='visible';
	if(document.getElementById('MessageLayer').offsetWidth>parseInt(BaseWindowWidth)*.8){document.getElementById('MessageLayer').style.width = parseInt(BaseWindowWidth)*.8 + 'px'; }
	if(document.getElementById('MessageLayer').offsetWidth<parseInt(BaseWindowWidth)*.4){document.getElementById('MessageLayer').style.width = parseInt(BaseWindowWidth)*.4 + 'px'; }
	if(document.getElementById('MessageLayer').offsetHeight>parseInt(screen.height)*.5){document.getElementById('MessageLayer').style.height = parseInt(screen.height)*.5 + 'px'; }
    
    WindowWidth = document.getElementById('MessageLayer').clientWidth
    if(isNaN(document.getElementById('MessageLayer').offsetWidth) || parseInt(document.getElementById('MessageLayer').offsetWidth)==0){WindowWidth = parseInt(document.getElementById('MessageLayer').style.width)}		
    document.getElementById('MessageLayer').style.left = parseInt(screen.width)/2 -  (WindowWidth/2) + GetScrollLeft() + 'px'    
	if(parseInt(document.getElementById('MessageLayer').style.left) < 10){document.getElementById('MessageLayer').style.left = '10px';}
	DropShadow(document.getElementById('MessageLayer'));
	//BounceWindow(document.getElementById('MessageLayer'));    
	
}


function DropShadow(callingObj){
	document.getElementById('MessageShadowDiv').style.top = parseInt(callingObj.style.top) -4 + 'px'
	document.getElementById('MessageShadowDiv').style.left = parseInt(callingObj.style.left)  -8 + 'px'
    document.getElementById('MessageShadowDiv').style.zIndex = callingObj.style.zIndex - 1
    document.images['MessageShadowImage'].style.width = parseInt(callingObj.offsetWidth) + 20 + 'px'
    document.images['MessageShadowImage'].style.height = parseInt(callingObj.offsetHeight) + 15 + 'px'
	document.getElementById('MessageShadowDiv').style.visibility='visible';

}


//_________________________________________________________________
function ShowAjaxForm(MessageHTML){
    if(MessageHTML.length>500){MessageHTML = '<div style="position:absolute;right:10px;"><img src="images/button_closeX.png" onclick="CloseAjaxForm();" alt="Click to close this window" style="margin-right:-6px;margin-top:-4px;cursor:pointer;"/></div><div style="padding-top:20px;word-wrap:break-word;">' + MessageHTML + '</div>'}
	document.getElementById('AjaxFormLayer').innerHTML = MessageHTML  + '<br clear="all"><br><div style="text-align:center;"><a href="javascript:CloseAjaxForm();" style="color:#FFFFFF;font-style:italic;">Close this form</a></div>';


	currentScrollTop = GetScrollTop()
	currentScrollLeft = GetScrollLeft()

	if(parseInt(document.getElementById('AjaxFormLayer').offsetWidth) > 1024){document.getElementById('AjaxFormLayer').style.width = '1024px';}
	
	document.getElementById('AjaxFormLayer').style.top = 100 + currentScrollTop + 'px' 
	document.getElementById('AjaxFormLayer').style.left = parseInt(screen.width)/2 -  (document.getElementById('AjaxFormLayer').offsetWidth/2) + currentScrollLeft + 'px'    
	document.getElementById('AjaxFormLayer').style.visibility='visible';
	
	DropAjaxShadow(document.getElementById('AjaxFormLayer'));
}

function DropAjaxShadow(callingObj){
    if(!IE){return}
	document.getElementById('AjaxFormShadowDiv').style.top = parseInt(callingObj.style.top) -4 + 'px'
	document.getElementById('AjaxFormShadowDiv').style.left = parseInt(callingObj.style.left)  -8 + 'px'
    document.getElementById('AjaxFormShadowDiv').style.zIndex = callingObj.style.zIndex - 1
    document.images['AjaxShadowImage'].style.width = parseInt(callingObj.offsetWidth) + 25 + 'px'
    document.images['AjaxShadowImage'].style.height = parseInt(callingObj.offsetHeight) + 20 + 'px'
	document.getElementById('AjaxFormShadowDiv').style.visibility='visible';
}

//_________________________________________________________________
function CloseAjaxForm(){
    divArray = document.getElementById('AjaxFormLayer').getElementsByTagName('div')
    for(i in divArray){try{divArray.item(i).style.visibility = 'hidden';}catch(e){}}
    document.getElementById('AjaxFormLayer').innerHTML = ''
    document.getElementById('AjaxFormLayer').style.visibility='hidden';
    document.getElementById('AjaxFormShadowDiv').style.visibility='hidden';
}

function ShowAdminNote(MessageHTML){

	document.getElementById('AdminNote').innerHTML = MessageHTML  + '<br clear="all"><br><div style="text-align:center;"><a href="javascript:CloseAjaxForm();" style="color:#FFFFFF;font-style:italic;">Close this form</a></div>';
	document.getElementById('AdminNote').style.top = 100 + GetScrollTop() + 'px' 
	document.getElementById('AdminNote').style.left = parseInt(screen.width) - (document.getElementById('AdminNote').offsetWidth + GetScrollTop() + 25)  + 'px';
	document.getElementById('AdminNote').style.visibility='visible';
	DropAdminNoteShadow(document.getElementById('AdminNote'));
}

function DropAdminNoteShadow(callingObj){
    if(!IE){return}
	document.getElementById('AdminNoteShadowDiv').style.top = parseInt(callingObj.style.top) -4 + 'px'
	document.getElementById('AdminNoteShadowDiv').style.left = parseInt(callingObj.style.left)  -8 + 'px'
    document.getElementById('AdminNoteShadowDiv').style.zIndex = callingObj.style.zIndex - 1
    document.images['AdminNoteShadowImage'].style.width = parseInt(callingObj.offsetWidth) + 25 + 'px'
    document.images['AdminNoteShadowImage'].style.height = parseInt(callingObj.offsetHeight) + 20 + 'px'
	document.getElementById('AdminNoteShadowDiv').style.visibility='visible';
}

function CloseAdminNote(){
    divArray = document.getElementById('AdminNote').getElementsByTagName('div')
    for(i in divArray){try{divArray.item(i).style.visibility = 'hidden';}catch(e){}}
    document.getElementById('AdminNote').innerHTML = ''
    document.getElementById('AdminNote').style.visibility='hidden';
    document.getElementById('AdminNoteShadowDiv').style.visibility='hidden';
}

//_________________________________________________________________
function CloseMessage(){
	document.getElementById('MessageLayer').style.visibility='hidden';
	document.getElementById('MessageShadowDiv').style.visibility='hidden';
	if(doPageFrefreshAfterMessageCloses){document.location.href = document.location.href }

}

//_________________________________________________________________

//_________________________________________________________________
function FormatCurrency(TargetNumber){
	TargetNumber = TargetNumber * 100;
	TargetNumber = Math.round(TargetNumber).toString();
	ThisPriceCash = TargetNumber.substring(0,TargetNumber.length-2)
	ThisPriceChange = TargetNumber.substring(TargetNumber.length-2,TargetNumber.length)
	return('$' + ThisPriceCash + '.' + ThisPriceChange);
}

//_________________________________________________________________
function echo(ResponseString){
    if (ResponseString==''){ResponseString = 'Note: An unkown script has attempted to display a message to you, but the message is empty.'}
    document.getElementById('echoDiv').innerHTML = ResponseString + "<br><span style=\"font-size:.7em;\" onclick=\"CloseEcho();\">(Click to close)</span>";
    document.getElementById('echoDiv').style.top = 100 + GetScrollTop() + 'px' 
    document.getElementById('echoDiv').style.left = (parseInt(screen.availWidth)/2) - (parseInt(document.getElementById('echoDiv').offsetWidth)/2);
    document.getElementById('echoDiv').style.visibility = 'visible';
    if(document.getElementById('echoDiv').offsetWidth>parseInt(BaseWindowWidth)*.8){document.getElementById('echoDiv').style.width = parseInt(BaseWindowWidth)*.8 + 'px';}    
	

	document.getElementById('EchoShadowDiv').style.top = parseInt(document.getElementById('echoDiv').style.top) + 5 + 'px'
	document.getElementById('EchoShadowDiv').style.left = parseInt(document.getElementById('echoDiv').style.left)  + 5 + 'px'
    document.getElementById('EchoShadowDiv').style.zIndex = document.getElementById('echoDiv').style.zIndex - 1
    document.images['EchoShadowImage'].style.width = parseInt(document.getElementById('echoDiv').offsetWidth) + 10 + 'px'
    document.images['EchoShadowImage'].style.height = parseInt(document.getElementById('echoDiv').offsetHeight) + 10 + 'px'
	document.getElementById('EchoShadowDiv').style.visibility='visible';

}

function CloseEcho(){
    document.getElementById('echoDiv').style.visibility = 'hidden';	
    document.getElementById('EchoShadowDiv').style.visibility='hidden';
}

function ShowOverlay(OverlayMessage){
    document.getElementById('PageOverlay').innerHTML = OverlayMessage
    document.getElementById('PageOverlay').style.top = '0px';
    document.getElementById('PageOverlay').style.left = '0px';
    document.getElementById('PageOverlay').style.height = parseInt(screen.availHeight) + GetScrollTop() + 20 + 'px';
    document.getElementById('PageOverlay').style.width = parseInt(screen.availWidth) + GetScrollLeft() + 20 + 'px';
    document.getElementById('PageOverlay').style.visibility = 'visible';
	oldOverFlow = document.body.style.overflow;
	document.body.style.overflow = 'hidden';

}

function HideOverlay(){
	try{document.body.style.overflow = oldOverFlow;}	catch(err){}
    document.getElementById('PageOverlay').style.visibility = 'hidden';
	document.getElementById('PageOverlay').style.width = '1px';
	document.getElementById('PageOverlay').style.height = '1px';
}

//_________________________________________________________________
function findPosX(obj)
{
    var curleft = 0;
    if (obj.offsetParent)
    {
        while (obj.offsetParent)
        {
            curleft += obj.offsetLeft
            obj = obj.offsetParent;
        }
    }
    else if (obj.x){curleft += obj.x;}
    return curleft;
}

//_________________________________________________________________
function findPosY(obj)
{
    var curtop = 0;
    if (obj.offsetParent)
    {
        while (obj.offsetParent)
        {
            curtop += obj.offsetTop
            obj = obj.offsetParent;
        }
    }
    else if (obj.y){curtop += obj.y;}
    return curtop;
}

//_________________________________________________________________
function GetLocation(TargetLocation,IsNewWindow){
    if(IsNewWindow==1){window.open(TargetLocation,'window2','width=700,height=580');}
    else{document.location.href=TargetLocation}
}

function ClearMessage(){
	document.getElementById('MessageDiv').innerHTML = "";
}

function BounceWindow(targetObj){
    BouncingObj = targetObj
    BouncingObj.BounceHome = parseInt(BouncingObj.style.left)
    BouncingObj.BounceOffset = 10;    
    DoBounce(BouncingObj);
}

function DoBounce(targetObj){
    if(isNaN(targetObj.BounceOffset)){targetObj.BounceOffset = 0}
    if(isNaN(targetObj.BounceHome)){targetObj.BounceHome = parseInt(targetObj.style.left)}
    if(targetObj.BounceOffset>=1){
        targetObj.style.left = (parseInt(targetObj.style.left)>targetObj.BounceHome)?targetObj.BounceHome -  targetObj.BounceOffset + 'px':targetObj.BounceHome +  targetObj.BounceOffset + 'px'
        if(document.getElementById('MessageShadowDiv').style.visibility=='visible'){DropShadow(targetObj);}
        targetObj.BounceOffset = targetObj.BounceOffset * .80;
        if(targetObj.BounceOffset<1){targetObj.BounceOffset = 0}        
    }
    if(targetObj.BounceOffset>=1){setTimeout('DoBounce(BouncingObj)',30);}
}

function CheckNumeric(CallingField){
	if(isNaN(CallingField.value)){
		ShowMessage('Please enter only numbers into this field')
		while((isNaN(CallingField.value)) && CallingField.value!=''){
			CallingField.value = CallingField.value.substring(0,CallingField.value.length-1)
		}
	}
}

function CheckIsDate(CallingField){
    DateTestValue = CallingField.value
    var DateTest = new Date(DateTestValue)
    if (isNaN(DateTest)){
		ShowMessage('Please enter only a date into this field.')
    }
}

function ShowFullImage(ImagePath){
    ShowOverlay('<table style="width:100%;height:100%;"><tr><td  style="width:100%;height:100%;vertical-align:center;text-align:center;"><img src="images/' + ImagePath + '"><br><a href="javascript:HideOverlay();">[Close]</a></td></tr></table>');
}

function GetObj(TargetObj){
    if(!ObjExist(TargetObj)){return false;}
    try{
        TmpObj = document.getElementById(TargetObj);
    }
    catch(e){return false;}
    return TmpObj;
}

function ObjExist(TargetObj){
    if(document.getElementById(TargetObj)){return true;}
    else{return false;}
}

function SubmitAJAXForm(FormName,targetPage){

    FormObj = document.forms[FormName];
    FormToPost = "";
    for (fieldIndex in FormObj.elements){
        field = FormObj.elements[fieldIndex]
        if(typeof(field)=='undefined' || field==null){continue}
        try{
            if (field.type=='select-one'){FormToPost += "&" + field.name + "=" + escape(field.options[field.options.selectedIndex].value);}
            else if(field.type=='checkbox'){FormToPost = (field.checked)? FormToPost + "&" + field.name + "=on":FormToPost + "&" + field.name + "=";}
            else if(field.type=='radio'){FormToPost = (field.checked)? FormToPost + "&" + field.name + "=" + field.value:FormToPost;}
            else if(typeof(field.name)!='undefined' && typeof(field.value)!='undefined'){FormToPost += "&" + field.name + "=" + escape(field.value); }  
        }
        catch(e){}
    }
    FormToPost = FormToPost.substring(1,FormToPost.length)
    //ShowMessage(FormToPost);
    //return;
    ret = XMLRequest(targetPage,FormToPost,null)
    if(ValidationFieldsArray.length > 0){
        for(i in ValidationFieldsArray){
            if(ValidationFieldsArray[i].style){
                ValidationFieldsArray[i].style.visibility = 'hidden'; 
                ValidationFieldsArray[i].style.height = '1px';
            }
        }
    }
    ValidationFieldsArray = new Array();
    if(ret.toLowerCase()=='ack'){
        CloseAjaxForm(); 
        if(document.location.href.indexOf('profile_')>-1){
            doPageFrefreshAfterMessageCloses = true; 
            ShowUserProfileUpdateMessage();
        }
        else{document.location.href=document.location.href}
    }
    else{ShowValidationFields(ret);}
    
}

function ShowUserProfileUpdateMessage(){
    ShowMessage('You have updated your profile.<br /><br />IMPORTANT NOTICE: <br />Any applications that you have posted prior to this update will not include the changes that you have just made. <br/><br/>If you want your changes to be reflected in your application(s), then you must re-post them. To re-post an application, view the "My Applications" tab and click the [View Job Details] link for the job in question. Once there, simply click the "Apply" button to restart the application process.');
}

function ShowValidationFields(fieldList){
    if(fieldList.indexOf('ValidationError:')>-1){fieldList = fieldList.split('ValidationError:')[1];}
    FieldArray = fieldList.split('|');
    for(validationFieldIndex=0;validationFieldIndex<FieldArray.length;++validationFieldIndex){
        fieldName = FieldArray[validationFieldIndex]
        if(fieldName.length == 0){continue;}
        DivName = 'FormValidation_' + fieldName
        try{
            document.getElementById(DivName).style.visibility = 'visible';
            document.getElementById(DivName).style.height = '100%';
            document.getElementById(DivName).style.width = '100%';
            ValidationFieldsArray.push(document.getElementById(DivName))
        }
        catch(e){ShowMessage(fieldList)}
    }
}

function CenterWindowAndDropShadow(TargetObj){
    if(TargetObj.style.width.indexOf('%')>-1){TargetObj.style.width = ((parseInt(TargetObj.style.width) /100) * 900) + 'px';}
    WindowWidth = parseInt(TargetObj.offsetWidth)
    if(WindowWidth==0 || isNaN(TargetObj.offsetWidth)){TargetObj.style.width = '890px'; WindowWidth = 890;}
    
    TargetObj.style.top = 100 + parseInt(document.body.scrollTop) + 'px' 
    
    TargetObj.style.top = 100 + parseInt(document.body.scrollTop) + 'px' 
    if(TargetObj.offsetWidth>parseInt(BaseWindowWidth)*.9){TargetObj.style.width = 900 *.9 + 'px'; TargetObj.style.overflow='auto'}
    
    TargetObj.style.left = (screen.width/2) - (WindowWidth/2) + parseInt(document.body.scrollLeft) + 'px'    	            
    if(parseInt(TargetObj.style.left) < 10){TargetObj.style.left = '10px';}

    if(TargetObj.offsetHeight>parseInt(screen.height)*.9){TargetObj.style.height = parseInt(screen.height)*.9 + 'px'; TargetObj.style.overflow='auto'}
    if(TargetObj.style.visibility=='visible'){DropShadow(TargetObj);}
    
}

//______________________________________________________________________________
//Added By Nick Silva: This function will allow use of SubmitAjaxForm with FCKeditor
//
function GetFCKContent(instance_name, hidden_field_id){
    var FCKinst = FCKeditorAPI.GetInstance(instance_name);
    var FCKcontent = FCKinst.GetHTML();
    var inputField = document.getElementById(hidden_field_id);
    inputField.value = FCKcontent;
}

function GetScrollTop(){
	currentScrollTop = parseInt(document.body.scrollTop) 
	if(document.documentElement && document.documentElement.scrollTop){currentScrollTop = parseInt(document.documentElement.scrollTop) } 
    return parseInt(currentScrollTop)
}

function GetScrollLeft(){
	currentScrollLeft = parseInt(document.body.scrollLeft) 
	if(document.documentElement && document.documentElement.scrollLeft){currentScrollTop = parseInt(document.documentElement.scrollLeft) } 
	return parseInt(currentScrollLeft)
}

function ShowAllDivs(){
    DivList = document.getElementsByTagName('div')
    for(i=0;i<DivList.length;++i){
        document.getElementsByTagName('div')[i].style.visibility = 'visible';
        document.getElementsByTagName('div')[i].style.borderWidth = '2px';
        document.getElementsByTagName('div')[i].style.borderStyle = 'solid';
        document.getElementsByTagName('div')[i].style.overflow = 'auto';
        document.getElementsByTagName('div')[i].innerHTML = document.getElementsByTagName('div')[i].id + '<br>' + document.getElementsByTagName('div')[i].innerHTML
        document.getElementsByTagName('div')[i].onclick = function anonymous(){alert(this.id);}
       
    }
}
