/*
 * Antiques and the Arts
 * Copyright(c) 2006, Wellspring.
 */


var adDirRoot='ads/';var requiredVersion=8;if(navigator.appVersion.indexOf("MSIE")>0&&navigator.appVersion.indexOf("Windows")>0){document.writeln('<scr'+'ipt language="VBscript">');document.writeln('on error resume next');document.writeln('flashInstalled = false');document.writeln('flashInstalled = IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.'+requiredVersion+'"))');document.writeln('</scr'+'ipt>');}
if(window.attachEvent){window.attachEvent('onload',initializeAdArrays);}else if(window.addEventListener){window.addEventListener('load',initializeAdArrays,false);}
function continueAdInitialization(){rotateIt();}
function rotateIt(){var currKey,currAdObject,targetNode,amountToWrite,sToWrite;if(ads&&ads.keys&&ads.keys.length){for(var i=0;i<ads.keys.length;i++){currKey=ads.keys[i]
if(ads[currKey]){currAdObject=ads[currKey];targetNode=document.getElementById(currKey+"Ads");amountToWrite=(currAdObject.length>=currAdObject.count)?currAdObject.count:currAdObject.length;if(targetNode&&currAdObject.length>0&amountToWrite>0){sToWrite='';for(var j=0;j<amountToWrite;j++){currAdObject.next();sToWrite+=currAdObject[currAdObject.index].html;targetNode.innerHTML=sToWrite;}}}}}
var newTimeout=12000;if(ads&&ads.timeout)newTimeout=ads.timeout;setTimeout("rotateIt()",newTimeout);}
function adArray(){for(var i=0;i<adArray.arguments.length;i++){this[i]=new Object();this[i].html=arguments[i];}
this.length=i;}
adArray.prototype.randomize=function(){var randNum=new Date();var adPosition;var divisor=(this.length>0)?this.length:1;adPosition=Math.round(Math.random()*10)%divisor;this.index=(this.length>0)?adPosition:0;}
adArray.prototype.next=function(){if(!this.index)this.index=0;this.index++;if(this.index>this.length-1){this.index=0;}}
function getDefaultAds(node,location){if(node.src!=adDirRoot+location+'/default/default.gif'){node.src=adDirRoot+location+'/default/default.gif';}else{node.src='';}}
function checkFlash(){if(navigator.appVersion.indexOf("MSIE")>0&&navigator.appVersion.indexOf("Windows")>0){return eval("flashInstalled");}
else if(navigator.plugins){if(navigator.plugins["Shockwave Flash"]){var flashDescription=navigator.plugins["Shockwave Flash"].description;var flashVersion=parseInt(flashDescription.charAt(flashDescription.indexOf(".")-1));if(flashVersion<requiredVersion){return false;}else{return true;}}}
return false;}
function LoadFlash(){var EmbedTags=document.getElementsByTagName('embed');for(var i=0;i<EmbedTags.length;i++){var currentParent=EmbedTags[i].parentNode;EmbedTags[i].style.display='block';for(var j=0;j<currentParent.childNodes.length;j++){if(currentParent.childNodes[j].id=='altFlashImage'){currentParent.removeChild(currentParent.childNodes[j])}}}
for(var i=0;i<ads.keys.length;i++){var currentKey=ads.keys[i];for(var j=0;j<ads[currentKey].length;j++){if(ads[currentKey][j].html.indexOf('embed')>0){ads[currentKey][j].html=ads[currentKey][j].html.replace(/:.*none.*;/gi,': block;');ads[currentKey][j].html=ads[currentKey][j].html.replace(/<div id=\"?altFlashImage\"?.*<\/a><\/div>/gi,'');}}}}

var INTERNAL_ddmlButtons=new Array();function ddmlButton(text,oFunction,className,id,name){this.text=text;this.targetFunction=oFunction;this.className=className||'ddmlButton';this.id=id;this.name=name;this.over=false;this.down=false;}
ddmlButton.prototype.getClass=function(){var newClass=this.className;newClass+=(this.over)?'Over':'';newClass+=(this.down)?'Down':'';return newClass;}
ddmlButton.prototype.getObject=function(){var newButton=document.createElement('div');newButton.innerHTML=this.text.replace(/&(?!amp;)/g,'&amp;');newButton.className=this.className;if(this.id)newButton.id=this.id;if(this.name)newButton.name=this.name;xAddEventListener(newButton,'mouseover',ddmlButtonOverE);xAddEventListener(newButton,'mouseout',ddmlButtonOutE);xAddEventListener(newButton,'mousedown',ddmlButtonDownE);xAddEventListener(newButton,'mouseup',ddmlButtonUpE);xAddEventListener(newButton,'selectstart',ddmlButtonSelect);if(this.targetFunction)xAddEventListener(newButton,'click',this.targetFunction);newButton.ddmlButton=this;newButton.ddmlButton.nodeIndex=INTERNAL_ddmlButtons.length;INTERNAL_ddmlButtons.push(newButton);return newButton;}
ddmlButton.prototype.getHTML=function(sExtra){if(!sExtra)sExtra='';var sFunctionName=this.targetFunction.toString().replace(/[\n\r]/g,'');sFunctionName=sFunctionName.replace(/function\s*(\w*).*/gim,'$1');return'<div id="'+this.id+'" name="'+this.name+'" class="'+this.className+'"'+' onmouseover="ddmlButtonOver(this);" onmouseout="ddmlButtonOut(this);"'+' onmousedown="ddmlButtonDown(this);" onmouseup="ddmlButtonUp(this);"'+' onclick="'+sFunctionName+'(event);" onselectstart="ddmlButtonSelect();" '+sExtra+'>'+
this.text+'</div>';}
ddmlButton.prototype.getNode=function(){if(this.nodeIndex!==null&&INTERNAL_ddmlButtons.length>this.nodeIndex)return INTERNAL_ddmlButtons[this.nodeIndex];}
function ddmlButtonFixHTMLButton(node){node.ddmlButton=new ddmlButton(node.innerHTML,null,node.className,node.id,node.name);node.ddmlButton.nodeIndex=INTERNAL_ddmlButtons.length;INTERNAL_ddmlButtons.push(node);}
function ddmlButtonOverE(e){var myEvent=new xEvent(e);ddmlButtonOver(myEvent.target);}
function ddmlButtonOver(node){if(node.ddmlButton){node.ddmlButton.over=true;if(node.ddmlButton.onMouseOver)node.ddmlButton.onMouseOver(node.ddmlButton);node.className=node.ddmlButton.getClass();}else{ddmlButtonFixHTMLButton(node);ddmlButtonOver(node)}}
function ddmlButtonOutE(e){var myEvent=new xEvent(e);ddmlButtonOut(myEvent.target);}
function ddmlButtonOut(node){if(node.ddmlButton){node.ddmlButton.over=false;if(node.ddmlButton.onMouseOut)node.ddmlButton.onMouseOut(node.ddmlButton);node.className=node.ddmlButton.getClass();}else{ddmlButtonFixHTMLButton(node);ddmlButtonOut(node);}}
var ddml_INTERNAL_buttonWatch;function ddmlButtonDownE(e){var myEvent=new xEvent(e);ddmlButtonDown(myEvent.target);}
function ddmlButtonDown(node){if(node.ddmlButton){xAddEventListener(document,'mousemove',ddmlButtonWatch);ddml_INTERNAL_buttonWatch=node;node.ddmlButton.down=true;node.className=node.ddmlButton.getClass();}else{ddmlButtonFixHTMLButton(node);ddmlButtonDown(node);}}
function ddmlButtonUpE(e){var myEvent=new xEvent(e);ddmlButtonUp(myEvent.target)}
function ddmlButtonUp(node){if(node.ddmlButton){xRemoveEventListener(document,'mousemove',ddmlButtonWatch);ddml_INTERNAL_buttonWatch=null;node.ddmlButton.down=false;node.className=node.ddmlButton.getClass();}else{ddmlButtonFixHTMLButton(node);ddmlButtonUp(node);}}
function ddmlButtonWatch(e){var myEvent=new xEvent(e);var currTarget=e.target||window.event.srcElement;if(currTarget!=ddml_INTERNAL_buttonWatch){ddmlButtonUp(ddml_INTERNAL_buttonWatch);}}
function ddmlButtonSelect(e){return false;}

if(Array.push){Array.prototype.push=function(obj){this[this.length]=obj;}}
var wsTabControls=new Object();wsTabControls.addEventTo=function(node,type,fn){if(node.addEventListener)node.addEventListener(type,fn,false);else if(node.attachEvent)node.attachEvent('on'+type,fn);}
wsTabControls.swapTab=function(event){var node;if(!event||!event.nodeName){if(!event)event=window.event;node=(event.target)?event.target:event.srcElement;}else if(event.nodeName){node=event;}
if(node){while(node.parentNode&&!(node.className.indexOf('tab')==0||node.className.indexOf('activeTab')==0)){node=node.parentNode;}
if(node.className.indexOf('tab')==0||node.className.indexOf('activeTab')==0){if(!node.ddmlButton)ddmlButtonFixHTMLButton(node);if(node.ddmlButton&&node.ddmlButton.target){if(node.ddmlButton.target.indexOf('http')==0){window.open(node.ddmlButton.target);}else{wsTabControls.createCookie('tabControl:'+node.ddmlButton.containerId+'Tabs:last',node.ddmlButton.target.replace('Container',''),7);wsTabControls[node.ddmlButton.containerId].clicked=true;var divs=document.getElementById(node.ddmlButton.containerId+'Tabs').getElementsByTagName('div');for(var i=0;i<divs.length;i++){if(divs[i].ddmlButton){if(divs[i].className.indexOf('tab')==0||divs[i].className.indexOf('activeTab')==0){divs[i].ddmlButton.className='tab';divs[i].className='tab';}
if(document.getElementById(divs[i].ddmlButton.target))
document.getElementById(divs[i].ddmlButton.target).style.display=(divs[i]==node)?'block':'none';}}
node.ddmlButton.className='activeTab';node.className='activeTab';}}}}}
wsTabControls.createCookie=function(name,value,days){var currDomain=window.location.toString();currDomain=currDomain.replace(/https?\:\/\//i,'');if(currDomain.indexOf('/')>0)currDomain=currDomain.substr(0,currDomain.indexOf('/'));var isIP=currDomain.search(/\d+.\d+.\d+\d+/)>=0;if(currDomain.indexOf('.')>=0&&currDomain.indexOf('.')!=currDomain.lastIndexOf('.')&&!isIP)
currDomain=currDomain.substring(currDomain.indexOf('.')+1,currDomain.length);if(!isIP)currDomain='.'+currDomain;if(days&&name.indexOf('mainTabs')<0){var date=new Date();date.setTime(date.getTime()+(days*24*60*60*1000));var expires="; expires="+date.toGMTString();}
else var expires="";var path='/';var head=document.getElementsByTagName('head')[0];var base=head.getElementsByTagName('base');if(base){base=base[0];path=base.getAttribute('href');path=path.replace(/https?:\/\//i,'');path=path.substr(path.indexOf('/'));}
var newCookie=name+"="+value+expires+"; path="+path+";domain="+currDomain;document.cookie=newCookie;}
wsTabControls.readCookie=function(name){var nameEQ=name+"=";var ca=document.cookie.split(';');for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==' ')c=c.substring(1,c.length);if(c.indexOf(nameEQ)==0)return c.substring(nameEQ.length,c.length);}
return null;}
function wsTabControl(containerId){if(!wsTabControls[containerId]){wsTabControls[containerId]=this;this.container=document.getElementById(containerId+'Tabs');this.tabs=new Array();this.clicked=false;var nodes=this.container.getElementsByTagName('div');var button;var tabCount=0;var contents;var buttonElement;var currTabName='';var isDefault=false;var lastTarget=wsTabControls.readCookie('tabControl:'+containerId+'Tabs:last');var qsRegEx=new RegExp('.*?[?&]'+containerId+'=([^&]*)');var location=window.location.toString();var querystringValue=(location.search(qsRegEx)>=0)?location.replace(qsRegEx,'$1'):'';for(var i=nodes.length-1;i>=0;i--){if(nodes[i].getAttribute('for')&&nodes[i].getAttribute('for')!=''&&nodes[i].className!='clear'){currTabName=nodes[i].getAttribute('for').replace('Container','');isDefault=nodes[i].getAttribute('defaultTab').toLowerCase()=='true';if(querystringValue==currTabName||(querystringValue==''&&lastTarget==currTabName)||(querystringValue==''&&(lastTarget==null||lastTarget=='')&&isDefault)){className='activeTab';this.queueSwap(nodes[i].getAttribute('for'));}else className='tab';if(nodes[i].innerText)contents=nodes[i].innerText;else if(nodes[i].textContent)contents=nodes[i].textContent;else contents=nodes[i].innerHTML;button=new ddmlButton(contents,wsTabControls.swapTab,className);button.target=nodes[i].getAttribute('for');button.containerId=containerId;buttonElement=button.getObject();if(nodes[i].onclick)wsTabControls.addEventTo(buttonElement,'click',nodes[i].onclick);this.tabs.push(buttonElement);tabCount++;nodes[i].parentNode.removeChild(nodes[i]);}}
for(var i=this.tabs.length-1;i>=0;i--){this.container.appendChild(this.tabs[i]);if(this.tabs[i].className=='activeTab')wsTabControls.swapTab({target:this.tabs[i]});}}
this.currNode=null;}
wsTabControl.prototype.queueSwap=function(id){var controlName='wsTabControls.'+this.container.id.replace(/Tabs$/,'');var func='if (!'+controlName+'.clicked) { window.status = '+controlName+'.clicked; '+controlName+'.swapContents(\''+id+'\'); }';if(window.attachEvent)window.attachEvent('onload',new Function(func));else if(window.addEventListener)window.addEventListener('load',new Function(func),false);}
wsTabControl.prototype.swapContents=function(id){var node;for(var i=0;i<this.tabs.length;i++){node=document.getElementById(this.tabs[i].ddmlButton.target);if(node)node.style.display=(this.tabs[i].ddmlButton.target==id)?'block':'none';}}

var wsAjax=new Object();wsAjax.canRequest=function(){return(window.XMLHttpRequest||window.ActiveXObject);}
wsAjax.submitForm=function(node,handler){if(!wsAjax.canRequest()){node.submit();}else{var fauxEvent=new Object();fauxEvent.target=node;wsAjax.getLink(fauxEvent,handler);}}
wsAjax.parseForm=function(node){var retVal='';for(var i=0;i<node.elements.length;i++){var currNode=node.elements[i];switch(currNode.nodeName.toLowerCase()){case'input':case'textarea':if(currNode.nodeName.toLowerCase()!='input'||currNode.type.toLowerCase()!='button'){if(!currNode.type||(currNode.type!='radio'&&currNode.type!='checkbox')||currNode.checked){if(currNode.value.replace(/\s*/g,'')!='')retVal+=currNode.name.replace(/ /g,'%20')+'='+currNode.value.replace(/ /g,'%20')+'&';}}
break;case'select':retVal+=currNode.name+'='+currNode.options[currNode.selectedIndex]+'&';break;}}
return(retVal=='')?retVal:retVal.substr(0,retVal.length-1);}
wsAjax.getLink=function(e,handler){if(wsAjax.canRequest()){var target;if(!e)e=window.event;else if(e.nodeName)target=e;else target=(e.srcElement)?e.srcElement:e.target;if(target){while(target&&target.nodeName&&target.nodeName.toLowerCase()!='a'&&target.nodeName.toLowerCase()!='form'&&target.parentNode)target=target.parentNode;if(target.nodeName.toLowerCase()=='a'){runRequest(target.href+'&onlyContent=true',resultHandler);}else if(target.nodeName.toLowerCase()=='form'){var finalTargetString=target.action;finalTargetString+='&onlyContent=true';wsAjax.runRequest(finalTargetString,handler,wsAjax.parseForm(target));}}
return false;}else{return true;}}
function db(msg,target){if(target&&document.getElementById(target)){document.getElementById(target).innerHTML+='<span style="font-size:6px;color:lightblue;">'+msg+'</span>';}else{document.body.innerHTML+='<span style="font-size:6px;color:lightblue;">'+msg+'</span>';}}
wsAjax.request=null;wsAjax.runRequest=function(sURL,handler,sendAsPost){this.request=null;if(!this.request){if(window.XMLHttpRequest){try{this.request=new XMLHttpRequest();}catch(e){this.request=null;}}else if(window.ActiveXObject){try{this.request=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{this.request=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){this.request=null;}}}}
if(this.request){var tsDate,ts;tsDate=new Date();ts=tsDate.getTime();if(!handler)handler=wsAjax.resultHandler;this.request.onreadystatechange=handler;document.body.style.cursor='wait';var target=sURL+'&ts='+ts;if(sendAsPost){this.request.open('POST',target,true);this.request.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");}else{this.request.open('GET',target,true);}
try{this.request.send(sendAsPost);}catch(e){this.request.send();}}
return this.request;}
wsAjax.resultHandler=function(){var retVal=-1;if(wsAjax.request.readyState==4){retVal=wsAjax.request.status;var newContent;if(wsAjax.request.status==200){newContent=wsAjax.request.responseText;document.body.style.cursor='';}else{window.status='Request failed on '+wsAjax.request.status;document.body.style.cursor='';newContent='<div class="error">We couldn\'t find the file you requested ('+wsAjax.request.status+').  Please try your request again.  If you still can\'t get your file, please contact the administrator.</div>';newContent=wsAjax.request.responseText;}
var headers=wsAjax.getResponseHeaders(wsAjax.request);if(headers['wsResponseTarget']&&headers['wsResponseTarget'].toString()!=''){var target=document.getElementById(headers['wsResponseTarget']);if(target){var action='replace';if(headers['wsResponseAction'].toString()!=''){action=headers['wsResponseAction'].toString().toLowerCase();}
switch(action){case'replace':target.innerHTML=newContent;break;case'append':target.innerHTML+=newContent;break;default:window.status='I don\'t understand a responseAction "'+action+'"';break;}
target.scrollTop=0;}else{window.status='I couldn\'t find a target area "'+headers['wsResponseTarget']+'"';}}}
return retVal}
wsAjax.getResponseHeaders=function(request){var sHeaders=request.getAllResponseHeaders();var oHeaders=new Object();oHeaders.keys=new Array();if(sHeaders!=''){var headers=sHeaders.split('\n');var headerRegExp=new RegExp('([^\:]*)\:(.*)','i');var prefix,suffix;for(var i in headers){prefix=headers[i].replace(headerRegExp,'$1');suffix=headers[i].replace(headerRegExp,'$2');if(prefix!=''&&suffix!=''){suffix=suffix.replace(/^\s+/,'').replace(/\s+$/,'');oHeaders[prefix]=suffix;oHeaders.keys.push(prefix);}}}
return oHeaders;}

var ddml_INTERNAL_validDrag=true;function ddmlPopupDragStart(ele,dx,dy){ddml_INTERNAL_validDrag=(xMoz||(ele.className&&(ele.className=='ddmlPopupHeader'||ele.className=='ddmlPopupTitle')));}
function ddmlPopupDrag(ele,dx,dy){if(ddml_INTERNAL_validDrag)xMoveTo(ele.parentNode.parentNode,xLeft(ele.parentNode.parentNode)+dx,xTop(ele.parentNode.parentNode)+dy);}
var ddmlActivePopups=new Array();var ddml_INTERNAL_activePopupFormRegister=new Array();function ddmlPopup(sName,sTitle){this.debug=arguments[2]||false;this.name=(sName)?sName:'';this.id='';this.title=sTitle;this.icon='';this.bShowToolbar=true;this.bAllowDrag=true;this.bAllowMaximize=false;this.bAllowMinimize=false;this.bShowClose=true;this.bCloseRightClickMenus=true;this.bShowMask=true;this.bAllowEscape=true;this.contents='';this.width=null;this.height=null;this.target=null;this.padding=30;this.bFade=true;this.fadeSpeed=50;this.fadeSize=.1;this.bIgnoreWidthBoundaries=false;this.bIgnoreHeightBoundaries=false;this.index=null;this.useBacking=!xMoz;this.body=null;this.inner=null;this.reNum=new RegExp('^[0-9\-]*$');}
function ddmlPopupToString(bShowContents){var contents;if(bShowContents)contents='"\n Contents:"'+(typeof this.contents=='string')?this.contents:this.contents.outerHTML;else contents='';return'Popup name:"'+this.name+'\n", ID:"'+this.id+contents+'"';}
ddmlPopup.prototype.toString=ddmlPopupToString;ddmlPopup.prototype.display=function(oParent){var bContinue=true;if(this.onBeforeDisplay)bContinue=this.onBeforeDisplay();if(!bContinue)return;this.body=document.createElement('div');this.body.style.textAlign='center';this.body.className='ddmlPopupOuter';if(this.id)this.body.id=this.id;var innerDiv=document.createElement('div');innerDiv.className='ddmlPopupInner';var popupBacking;if(this.useBacking){if(this.debug)ddmlAddThread('debug_ddmlPopup.display','ddml','Adding an iframe back for IE select hiding');innerDiv.className+='Backed';popupBacking=document.createElement('iframe');popupBacking.className='ddmlPopupIframeBack';popupBacking.name='ddmlPopupIframeBack';popupBacking.style.zIndex=-100;this.body.appendChild(popupBacking);popupBacking.style.dispay='';}
var header;if(this.bShowToolbar){if(this.debug)ddmlAddThread('debug_ddmlPopup.display','ddml','Adding a toolbar to the popup "'+this.name+'"');header=document.createElement('div');header.className='ddmlPopupHeader';if(this.icon||this.title){var titleNode=document.createElement('div');titleNode.className='ddmlPopupTitle';if(typeof this.icon=='string')titleNode.innerHTML=this.icon+this.title;else{titleNode.appendChild(this.icon);titleNode.appendChild(document.createTextNode(this.title));}
header.appendChild(titleNode);}
var closeButton=new ddmlButton('X',ddmlCloseThisPopupE,'ddmlPopupButton');var maximizeButton=new ddmlButton('|=|',ddmlMaximizeThisPopupE,'ddmlPopupButton');var minimizeButton=new ddmlButton('||',null,'ddmlPopupButton');var debugButton=new ddmlButton('?',ddmlDebugThisPopupE,'ddmlPopupButton');if(this.bShowClose)header.appendChild(closeButton.getObject());if(this.bAllowMaximize)header.appendChild(maximizeButton.getObject());if(this.bAllowMinimize)header.appendChild(minimizeButton.getObject());if(this.debug)header.appendChild(debugButton.getObject());innerDiv.appendChild(header);}
if(typeof this.contents=='string'){if(this.debug)ddmlAddThread('debug_ddmlPopup.display','ddml','Inserting string-based contents "'+this.contents+'"');var contents=document.createElement('div');contents.innerHTML=this.contents;innerDiv.appendChild(contents);}else if(this.contents&&this.contents.nodeName){if(this.debug)ddmlAddThread('debug_ddmlPopup.display','ddml','Inserting a node '+getElementIDString(this.contents)+' into the popup "'+this.name+'"');this.contents.style.display='block';this.contents.style.visibility='visible';innerDiv.appendChild(this.contents);}else{ddmlAddThread('error_ddmlPopup.display','ddml','No valid contents were declared - '+getElementIDString(contents)+' was passed.');}
this.body.appendChild(innerDiv);this.body.style.position='absolute';this.body.style.top='0px';this.body.style.left='0px';this.body.style.display='block';document.body.appendChild(this.body);this.size();if(this.target&&this.target.length==3&&this.target[0].nodeName){var newTop=xPageY(this.target[0])-xHeight(this.body);var newBottom=xPageY(this.target[0])+xHeight(this.target[0])+xHeight(this.body);var newLeft=xPageX(this.target[0])-xWidth(this.body);var newRight=xPageX(this.target[0])+xWidth(this.target[0])+xWidth(this.body);if(!this.bIgnoreWidthBoundaries){switch(this.target[1].toLowerCase()){case'left':if(this._distanceFrom('left',newLeft)<0&&this._distanceFrom('left',newLeft)<this._distanceFrom('right',newRight)){this.target[1]='right';}
break;case'right':if(this._distanceFrom('right',newRight)<0&&this._distanceFrom('right',newRight)<this._distanceFrom('left',newLeft)){this.target[1]='left';}
break;}}
if(!this.bIgnoreHeightBoundaries){switch(this.target[2].toLowerCase()){case'top':if(this._distanceFrom('top',newTop)<0&&this._distanceFrom('top',newTop)<this._distanceFrom('bottom',newBottom)){this.target[2]='bottom';}
break;case'bottom':if(this._distanceFrom('bottom',newBottom)<0&&this._distanceFrom('bottom',newBottom)<this._distanceFrom('top',newTop)){this.target[2]='top';}
break;}}}
this.position();this.register(oParent);if(this.bFade){if(this.body.currentStyle)this._existingIEFilter=this.body.currentStyle.filter;if(!this._existingIEFilter||this._existingIEFilter=='undefined')this._existingIEFilter='';this.fade(0);setTimeout('ddmlPopupFade('+this.index+', 1)',this.fadeSpeed);}
if(this.bAllowDrag&&header){if(this.debug)ddmlAddThread('debug_ddmlPopup.display','ddml','Enabling drag for the popup "'+this.name+'"');var finalDragEvent=(this.onDragEnd)?this.onDragEnd:null;xEnableDrag(header,ddmlPopupDragStart,ddmlPopupDrag,finalDragEvent);}
var inputs=this.body.getElementsByTagName('input');var bFound=false;for(var i=0;i<inputs.length;i++){if(inputs[i].type.search(/hidden/i)<0&&isNodeVisible(inputs[i])){bFound=true;inputs[i].focus();break;}}
if(!bFound){var selects=this.body.getElementsByTagName('select');for(var i=0;i<selects.length;i++){if(selects[i].type.search(/hidden/i)<0&&isNodeVisible(selects[i])){selects[i].focus();break;}}}
if(this.onAfterDisplay)this.onAfterDisplay();display=this.body;}
ddmlPopup.prototype.maximize=function(){this.width=xClientWidth()-(this.padding);this.height=xb.clientHeight()-(this.padding);if(this.debug)ddmlAddThread('debug_ddmlPopup.maximize','ddml','Maximizing the popup "'+this.name+'" to width='+this.width+' and height='+this.height);}
ddmlPopup.prototype.size=function(){if(this.width&&this.reNum.test(this.width))xWidth(this.body,this.width);if(this.height&&this.reNum.test(this.height))xHeight(this.body,this.height);if(this.useBacking)xResizeTo(this.body.getElementsByTagName('iframe')[0],xWidth(this.body),xHeight(this.body));if(this.debug)ddmlAddThread('debug_ddmlPopup.size','ddml','Attempted to resize the popup "'+this.name+'" to width='+this.width+' and height='+this.height+'.  Actual results are width='+xWidth(this.body)+' height='+xHeight(this.body)+'.  If these numbers differ, the content of your popup '+'couldn\'t be compressed and needs to be sized appropriatley before being added.');}
ddmlPopup.prototype.position=function(){var screenWidth=xClientWidth();var screenHeight=xb.clientHeight();var width=xWidth(this.body);var height=xHeight(this.body);var newTop=xScrollTop()+(screenHeight/2-height/2);var newLeft=xScrollLeft()+(screenWidth/2-width/2);if(this.target&&this.target.length&&this.target.length==3){if(this.target[0].nodeName){var target=this.target[0];var targetTop=xPageY(target);var targetLeft=xPageX(target);var targetHeight=xHeight(target);var targetWidth=xWidth(target);switch(this.target[1]){case'middle':newLeft=targetLeft+targetWidth/2-width/2;if(!this.bIgnoreWidthBoundaries){if(newLeft<xScrollLeft())newLeft=xScrollLeft();if(newLeft+width>=xClientWidth()+xScrollLeft())newLeft=xClientWidth()+xScrollLeft()-width;}
break;case'left':newLeft=targetLeft-width;break;case'right':newLeft=targetLeft+targetWidth;break;default:if(this.reNum.test(this.target[1])){newLeft=targetLeft+(this.target[1]*1);}
break;}
switch(this.target[2]){case'center':newTop=targetTop+targetHeight/2-height/2;if(!this.bIgnoreHeightBoundaries){if(newTop<xScrollTop())newTop=xScrollTop();if(newTop+height>=xb.clientHeight()+xScrollTop())newTop=xb.clientHeight()+xScrollTop()-height;}
break;case'top':newTop=targetTop-height;break;case'bottom':newTop=targetTop+targetHeight;break;default:if(this.reNum.test(target[2]))newTop=targetTop+parseInt(target[2]);break;}}}
else if(this.target&&this.target.length&&this.target.length==2){switch(this.target[0]){case'middle':break;case'left':newLeft=0;break;case'right':newLeft=screenWidth-width;break;default:if(this.reNum.test(this.target[0]))newLeft=parseInt(this.target[0]);break;}
switch(this.target[1]){case'center':break;case'top':newTop=0;break;case'bottom':newTop=screenHeight-height;break;default:if(this.reNum.test(this.target[1]))newTop=parseInt(this.target[1]);break;}
if(!this.bIgnoreHeightBoundaries){if(newTop+height>screenHeight+xScrollTop())newTop=screenHeight-height;if(newTop<0)newTop=0;}
if(!this.bIgnoreWidthBoundaries){if(newLeft+width>screenWidth+xScrollLeft())newLeft=screenWidth-width;if(newLeft<0)newLeft=0;}}
if(this.debug)ddmlAddThread('debug_ddmlPopup.position','ddml','Moving the popup "'+this.name+'" to x='+newLeft+', y='+newTop);xLeft(this.body,newLeft);xTop(this.body,newTop);}
ddmlPopup.prototype._distanceFrom=function(side,value){var retVal=0;switch(side.toLowerCase()){case'left':if(!value)value=xLeft(this.body);retVal=value-xScrollLeft();break;case'right':if(!value)value=xLeft(this.body)+xWidth(this.body);retVal=xClientWidth()+xScrollLeft()-value;break;case'top':if(!value)value=xTop(this.body);retVal=value-xScrollTop();break;case'bottom':if(!value)value=xTop(this.body)+xHeight(this.body);retVal=xb.clientHeight()+xScrollTop()-value;break;}
return retVal;}
ddmlPopup.prototype.fade=function(counter){var newFade1Scale=(counter*this.fadeSize>1)?1:counter*this.fadeSize;newFade1Scale=Math.round(newFade1Scale*10)/10;this.body.style.opacity=newFade1Scale;this.body.style.filter=this._existingIEFilter+' progid:DXImageTransform.Microsoft.Alpha(opacity='+(newFade1Scale*100)+', style=0)';counter++;if(newFade1Scale<1&&ddmlActivePopups[this.index]&&ddmlActivePopups[this.index].fade)
setTimeout('ddmlPopupFade('+this.index+', '+counter+')',this.fadeSpeed);else{var origFilter=this.body.style.filter;this.body.style.filter=this._existingIEFilter;}}
ddmlPopup.prototype.register=function(oParent){this.body.ddmlPopup=ddmlActivePopups.length;this.index=ddmlActivePopups.length;ddmlActivePopups.push(this);}
ddmlPopup.prototype.destroy=function(){if(this.body&&!this.nodeName){var bContinue=(window.localPopupDestroy)?localPopupDestroy(this):true;if(this.onBeforeClose)bContinue=this.onBeforeClose();if(!bContinue)return;if(this.debug)ddmlAddThread('debug_ddmlPopup.destroy','ddml','Removing DOM references to popup "'+this.toString()+'"');var forms=this.body.getElementsByTagName('form');var bContinue=true;if(forms.length>0){for(var i=ddml_INTERNAL_activePopupFormRegister.length-1;i>=0;i--){if(this.debug)ddmlAddThread('debug_ddmlPopup.destroy','ddml','Destroying saved item, '+getElementIDString(ddml_INTERNAL_activePopupFormRegister[i]));for(var j=0;j<forms.length;j++){if(forms[j]==ddml_INTERNAL_activePopupFormRegister){bContinue=false;break;}}
if(bContinue&&ddml_INTERNAL_activePopupFormRegister[i]){ddmlRemoveNode(ddml_INTERNAL_activePopupFormRegister[i]);}
bContinue=true;}
ddml_INTERNAL_activePopupFormRegister=new Array();for(var i=forms.length-1;i>=0;i--){if(forms[i]&&forms[i].style){forms[i].style.display='none';forms[i].name+=new Date();if(this.debug)ddmlAddThread('debug_ddmlPopup.destroy','ddml','Backing up item, '+getElementIDString(forms[i]));ddml_INTERNAL_activePopupFormRegister.push(document.body.appendChild(forms[i]));}}}
ddmlRemoveNode(this.body,true);if(this.debug)ddmlAddThread('debug_ddmlPopup.destroy','ddml','Destryoing popup at index '+this.index+' of '+ddmlActivePopups.length);ddmlActivePopups.splice(this.index-1,1);if(this.debug)ddmlAddThread('debug_ddmlPopup.destroy','ddml','New length after destruction:'+ddmlActivePopups.length+'.');for(var i=0;i<ddmlActivePopups.length;i++){ddmlActivePopups[i].index=i+1;if(ddmlActivePopups[i].body)ddmlActivePopups[i].body.ddmlPopup=i+1;}}else{ddmlAddThread('error_ddmlPopup.destroy','ddml','The destroy function for popup '+this+' was called, but the popup had no content.  No popup destruction will occur.');}
this.body=null;this.contents=null;this.reNum=null;if(this.onAfterClose)bContinue=this.onAfterClose();}
function ddmlGetThisPopup(node){var origNode=node;if(node){while(node.ddmlPopup==null&&node.parentNode&&node.parentNode.nodeType&&node.parentNode.nodeType==1)node=node.parentNode;if(node.ddmlPopup!=null){return ddmlActivePopups[(node.ddmlPopup*1)];}}
ddmlAddThread('error_ddmlGetThisPopup','ddml','System tried to get a popup and failed.  Called was '+getElementIDString(origNode)+' and last node looked at was '+getElementIDString(node));return null;}
function ddmlGetTopPopup(){if(ddmlActivePopups.length>0&&ddmlActivePopups[ddmlActivePopups.length-1].bAllowEscape){return ddmlActivePopups[ddmlActivePopups.length-1];}else{return null;}}
function ddmlCloseThisPopupE(e){var event=new xEvent(e);ddmlCloseThisPopup(event.target);}
function ddmlCloseThisPopup(node){var popup=ddmlGetThisPopup(node);if(popup){popup.destroy();return true;}
ddmlAddThread('error_ddmlCloseThisPopup','ddml','System tried to close a popup and failed.  Called was '+getElementIDString(node)+' and the popup object was '+popup);return false;}
function ddmlMaximizeThisPopupE(e){var event=new xEvent(e);ddmlMaximizeThisPopup(event.target);}
function ddmlMaximizeThisPopup(node){var popup=ddmlGetThisPopup(node);if(popup){ddmlAddThread('debug_ddmlMaximizeThisPopup','ddml','Maximizing popup at index '+i+' of '+ddmlActivePopups.length);popup.maximize();popup.size();popup.position();return true;}
ddmlAddThread('error_ddmlMaximizeThisPopup','ddml','System tried to maximize a popup and failed.  Called was '+getElementIDString(node)+' and the popup object was '+popup);return false;}
function ddmlCloseAllPopups(){for(var i=ddmlActivePopups.length-1;i>=0;i--){ddmlActivePopups[i].destroy();}
ddmlActivePopups=new Array();}
function ddmlCloseTopPopup(){if(ddmlActivePopups.length>0&&ddmlActivePopups[ddmlActivePopups.length-1].bAllowEscape)ddmlActivePopups[ddmlActivePopups.length-1].destroy();}
function ddmlDebugThisPopupE(e){var event=new xEvent(e);ddmlDebugThisPopup(event.target);}
function ddmlDebugThisPopup(node){var popup=ddmlGetThisPopup(node);if(popup){alert(popup.toString(true));return true;}
ddmlAddThread('error_ddmlMaximizeThisPopup','ddml','System tried to maximize a popup and failed.  Called was '+getElementIDString(node)+' and the popup object was '+popup);return false;}
function ddmlGetCurrentPopupTrace(){ddmlAddThread('debug_ddmlPopups','ddml',ddmlActivePopups.length+' popups are currently registered in the system.');for(var i=0;i<ddmlActivePopups.length;i++){ddmlAddThread('debug_ddmlPopups','ddml','Popup #'+(i+1)+' - '+ddmlActivePopups[i]);}}
function ddmlPopupFade(popupIndex,counter){if(ddmlActivePopups[popupIndex]){ddmlActivePopups[popupIndex].fade(counter);}}
if(window.addEventListener)window.addEventListener('keydown',clearTopPopupOnEscape,false);else if(window.attachEvent){window.attachEvent('onload',function(){document.body.attachEvent('onkeypress',clearTopPopupOnEscape);});}
function clearTopPopupOnEscape(e){if(!e)e=window.event;if(e.keyCode==27)ddmlCloseTopPopup();}
function ddmlAddThread(){return false;};function ddmlRemoveNode(node){node.parentNode.removeChild(node);node.innerHTML='';node=null;}
function isNodeVisible(oNode){var retVal=true;var loopNode=oNode;while(retVal&&loopNode.parentNode){if(loopNode.style.display.toLowerCase()=='none'||xb.getStyle(loopNode,'display').toLowerCase()=='none'||xb.getStyle(loopNode,'visibility').toLowerCase()=='hidden'||loopNode.style.visibility.toLowerCase()=='hidden'){retVal=false;}
loopNode=loopNode.parentNode;}
return retVal;}
function domChildren(parentNode){if(parentNode){var retVal=false;if(parentNode.children){retVal=parentNode.children;}else if(parentNode.childNodes){retVal=new Array();for(var i=0;i<parentNode.childNodes.length;i++){(parentNode.childNodes[i].nodeType==1)?retVal.push(parentNode.childNodes[i]):null;}}
return retVal;}else{return new Array();}}
function getElementIDString(node){if(!node||!node.nodeName)return'(Invalid node)';else return node.nodeName+' (id='+node.id+')';}

var xb=new Object();xb.clientHeight=function(){var retVal=-1;if(window.innerHeight)retVal=window.innerHeight;else if(document.documentElement&&document.documentElement.clientHeight)retVal=document.documentElement.clientHeight;else if(document.body&&document.body.clientHeight)retVal=document.body.clientHeight;return retVal;}
xb.getStyle=function(node,cssProperty,GeckoProperty){var retVal=null;if(node.currentStyle){retVal=node.currentStyle[cssProperty];}else if(window.getComputedStyle){if(node.nodeType==1){var elstyle=document.defaultView.getComputedStyle(node,"");var propToUse=(GeckoProperty)?GeckoProperty:cssProperty;retVal=elstyle.getPropertyValue(propToUse);}}
return retVal;}
xb.getUrlRoot=function(){var retVal='';var header=document.getElementsByTagName('head');if(header.length>0){var base=header[0].getElementsByTagName('base');if(base.length>0){retVal=base[0].href;}}
return retVal;}
xb.bindEvent=function(node,type,fn){if(node.addEventListener)node.addEventListener(type,fn,false);else if(node.attachEvent)node.attachEvent('in'+type,fn);}

var xVersion='3.15.4',xNN4,xOp7,xOp5or6,xIE4Up,xIE4,xIE5,xUA=navigator.userAgent.toLowerCase();if(window.opera){xOp7=(xUA.indexOf('opera 7')!=-1||xUA.indexOf('opera/7')!=-1);if(!xOp7)xOp5or6=(xUA.indexOf('opera 5')!=-1||xUA.indexOf('opera/5')!=-1||xUA.indexOf('opera 6')!=-1||xUA.indexOf('opera/6')!=-1);}
else if(document.all&&xUA.indexOf('msie')!=-1){xIE4Up=parseInt(navigator.appVersion)>=4;xIE4=xUA.indexOf('msie 4')!=-1;xIE5=xUA.indexOf('msie 5')!=-1;}
else if(document.layers){xNN4=true;}
xMoz=xUA.indexOf('gecko')!=-1;xMac=xUA.indexOf('mac')!=-1;function xGetElementById(e){if(typeof(e)!='string')return e;if(document.getElementById)e=document.getElementById(e);else if(document.all)e=document.all[e];else e=null;return e;}
function xParent(e,bNode){if(!(e=xGetElementById(e)))return null;var p=null;if(!bNode&&xDef(e.offsetParent))p=e.offsetParent;else if(xDef(e.parentNode))p=e.parentNode;else if(xDef(e.parentElement))p=e.parentElement;return p;}
function xDef(){for(var i=0;i<arguments.length;++i){if(typeof(arguments[i])=='undefined')return false;}
return true;}
function xStr(){for(var i=0;i<arguments.length;++i){if(typeof(arguments[i])!='string')return false;}
return true;}
function xNum(){for(var i=0;i<arguments.length;++i){if(typeof(arguments[i])!='number')return false;}
return true;}
function xShow(e){return xVisibility(e,1);}
function xHide(e){return xVisibility(e,0);}
function xVisibility(e,bShow)
{if(!(e=xGetElementById(e)))return null;if(e.style&&xDef(e.style.visibility)){if(xDef(bShow))e.style.visibility=bShow?'visible':'hidden';return e.style.visibility;}
return null;}
function xDisplay(e,sProp)
{if(!(e=xGetElementById(e)))return null;if(e.style&&xDef(e.style.display)){if(xStr(sProp))e.style.display=sProp;return e.style.display;}
return null;}
function xZIndex(e,uZ){if(!(e=xGetElementById(e)))return 0;if(e.style&&xDef(e.style.zIndex)){if(xNum(uZ))e.style.zIndex=uZ;uZ=parseInt(e.style.zIndex);}
return uZ;}
function xColor(e,sColor){if(!(e=xGetElementById(e)))return'';var c='';if(e.style&&xDef(e.style.color)){if(xStr(sColor))e.style.color=sColor;c=e.style.color;}
return c;}
function xBackground(e,sColor,sImage){if(!(e=xGetElementById(e)))return'';var bg='';if(e.style){if(xStr(sColor)){if(!xOp5or6)e.style.backgroundColor=sColor;else e.style.background=sColor;}
if(xStr(sImage))e.style.backgroundImage=(sImage!='')?'url('+sImage+')':null;if(!xOp5or6)bg=e.style.backgroundColor;else bg=e.style.background;}
return bg;}
function xMoveTo(e,iX,iY){xLeft(e,iX);xTop(e,iY);}
function xLeft(e,iX){if(!(e=xGetElementById(e)))return 0;var css=xDef(e.style);if(css&&xStr(e.style.left)){if(xNum(iX))e.style.left=iX+'px';else{iX=parseInt(e.style.left);if(isNaN(iX))iX=0;}}
else if(css&&xDef(e.style.pixelLeft)){if(xNum(iX))e.style.pixelLeft=iX;else iX=e.style.pixelLeft;}
return iX;}
function xTop(e,iY){if(!(e=xGetElementById(e)))return 0;var css=xDef(e.style);if(css&&xStr(e.style.top)){if(xNum(iY))e.style.top=iY+'px';else{iY=parseInt(e.style.top);if(isNaN(iY))iY=0;}}
else if(css&&xDef(e.style.pixelTop)){if(xNum(iY))e.style.pixelTop=iY;else iY=e.style.pixelTop;}
return iY;}
function xPageX(e){if(!(e=xGetElementById(e)))return 0;var x=0;while(e){if(xDef(e.offsetLeft))x+=e.offsetLeft;e=xDef(e.offsetParent)?e.offsetParent:null;}
return x;}
function xPageY(e){if(!(e=xGetElementById(e)))return 0;var y=0;while(e){if(xDef(e.offsetTop))y+=e.offsetTop;e=xDef(e.offsetParent)?e.offsetParent:null;}
return y;}
function xOffsetLeft(e){if(!(e=xGetElementById(e)))return 0;if(xDef(e.offsetLeft))return e.offsetLeft;else return 0;}
function xOffsetTop(e){if(!(e=xGetElementById(e)))return 0;if(xDef(e.offsetTop))return e.offsetTop;else return 0;}
function xScrollLeft(e,bWin){var offset=0;if(!xDef(e)||bWin){var w=e||window;if(w.document.documentElement&&w.document.documentElement.scrollLeft)offset=w.document.documentElement.scrollLeft;else if(w.document.body&&xDef(w.document.body.scrollLeft))offset=w.document.body.scrollLeft;}
else{e=xGetElementById(e);if(e&&xNum(e.scrollLeft))offset=e.scrollLeft;}
return offset;}
function xScrollTop(e,bWin){var offset=0;if(!xDef(e)||bWin){var w=e||window;if(w.document.documentElement&&w.document.documentElement.scrollTop)offset=w.document.documentElement.scrollTop;else if(w.document.body&&xDef(w.document.body.scrollTop))offset=w.document.body.scrollTop;}
else{e=xGetElementById(e);if(e&&xNum(e.scrollTop))offset=e.scrollTop;}
return offset;}
function xHasPoint(ele,iLeft,iTop,iClpT,iClpR,iClpB,iClpL){if(!xNum(iClpT)){iClpT=iClpR=iClpB=iClpL=0;}
else if(!xNum(iClpR)){iClpR=iClpB=iClpL=iClpT;}
else if(!xNum(iClpB)){iClpL=iClpR;iClpB=iClpT;}
var thisX=xPageX(ele),thisY=xPageY(ele);return(iLeft>=thisX+iClpL&&iLeft<=thisX+xWidth(ele)-iClpR&&iTop>=thisY+iClpT&&iTop<=thisY+xHeight(ele)-iClpB);}
function xResizeTo(e,uW,uH){xWidth(e,uW);xHeight(e,uH);}
function xWidth(e,uW){if(!(e=xGetElementById(e)))return 0;if(xNum(uW)){if(uW<0)uW=0;else uW=Math.round(uW);}
else uW=-1;var css=xDef(e.style);if(css&&xDef(e.offsetWidth)&&xStr(e.style.width)){if(uW>=0)xSetCW(e,uW);uW=e.offsetWidth;}
else if(css&&xDef(e.style.pixelWidth)){if(uW>=0)e.style.pixelWidth=uW;uW=e.style.pixelWidth;}
return uW;}
function xHeight(e,uH){if(!(e=xGetElementById(e)))return 0;if(xNum(uH)){if(uH<0)uH=0;else uH=Math.round(uH);}
else uH=-1;var css=xDef(e.style);if(css&&xDef(e.offsetHeight)&&xStr(e.style.height)){if(uH>=0)xSetCH(e,uH);uH=e.offsetHeight;}
else if(css&&xDef(e.style.pixelHeight)){if(uH>=0)e.style.pixelHeight=uH;uH=e.style.pixelHeight;}
return uH;}
function xGetCS(ele,sP){return parseInt(document.defaultView.getComputedStyle(ele,'').getPropertyValue(sP));}
function xSetCW(ele,uW){var pl=0,pr=0,bl=0,br=0;if(xDef(document.defaultView)&&xDef(document.defaultView.getComputedStyle)){pl=xGetCS(ele,'padding-left');pr=xGetCS(ele,'padding-right');bl=xGetCS(ele,'border-left-width');br=xGetCS(ele,'border-right-width');}
else if(xDef(ele.currentStyle,document.compatMode)){if(document.compatMode=='CSS1Compat'){pl=parseInt(ele.currentStyle.paddingLeft);pr=parseInt(ele.currentStyle.paddingRight);bl=parseInt(ele.currentStyle.borderLeftWidth);br=parseInt(ele.currentStyle.borderRightWidth);}}
else if(xDef(ele.offsetWidth,ele.style.width)){ele.style.width=uW+'px';pl=ele.offsetWidth-uW;}
if(isNaN(pl))pl=0;if(isNaN(pr))pr=0;if(isNaN(bl))bl=0;if(isNaN(br))br=0;var cssW=uW-(pl+pr+bl+br);if(isNaN(cssW)||cssW<0)return;else ele.style.width=cssW+'px';}
function xSetCH(ele,uH){var pt=0,pb=0,bt=0,bb=0;if(xDef(document.defaultView)&&xDef(document.defaultView.getComputedStyle)){pt=xGetCS(ele,'padding-top');pb=xGetCS(ele,'padding-bottom');bt=xGetCS(ele,'border-top-width');bb=xGetCS(ele,'border-bottom-width');}
else if(xDef(ele.currentStyle,document.compatMode)){if(document.compatMode=='CSS1Compat'){pt=parseInt(ele.currentStyle.paddingTop);pb=parseInt(ele.currentStyle.paddingBottom);bt=parseInt(ele.currentStyle.borderTopWidth);bb=parseInt(ele.currentStyle.borderBottomWidth);}}
else if(xDef(ele.offsetHeight,ele.style.height)){ele.style.height=uH+'px';pt=ele.offsetHeight-uH;}
if(isNaN(pt))pt=0;if(isNaN(pb))pb=0;if(isNaN(bt))bt=0;if(isNaN(bb))bb=0;var cssH=uH-(pt+pb+bt+bb);if(isNaN(cssH)||cssH<0)return;else ele.style.height=cssH+'px';}
function xClip(e,iTop,iRight,iBottom,iLeft){if(!(e=xGetElementById(e)))return;if(e.style){if(xNum(iLeft))e.style.clip='rect('+iTop+'px '+iRight+'px '+iBottom+'px '+iLeft+'px)';else e.style.clip='rect(0 '+parseInt(e.style.width)+'px '+parseInt(e.style.height)+'px 0)';}}
function xClientWidth(){var w=0;if(xOp5or6)w=window.innerWidth;else if(document.compatMode=='CSS1Compat'&&!window.opera&&document.documentElement&&document.documentElement.clientWidth)
w=document.documentElement.clientWidth;else if(document.body&&document.body.clientWidth)
w=document.body.clientWidth;else if(xDef(window.innerWidth,window.innerHeight,document.height)){w=window.innerWidth;if(document.height>window.innerHeight)w-=16;}
return w;}
function xClientHeight(){var h=0;if(xOp5or6)h=window.innerHeight;else if(document.compatMode=='CSS1Compat'&&!window.opera&&document.documentElement&&document.documentElement.clientHeight)
h=document.documentElement.clientHeight;else if(document.body&&document.body.clientHeight&&document.body.clientHeight>100)
h=document.body.clientHeight;else if(xDef(window.innerWidth,window.innerHeight,document.width)){h=window.innerHeight;if(document.width>window.innerWidth)h-=16;}
return h;}

function xWalkEleTree(oNode,fnVisit,oData,iLevel,iBranch)
{if(typeof iLevel=='undefined')iLevel=0;if(typeof iBranch=='undefined')iBranch=0;var v=fnVisit(oNode,iLevel,iBranch,oData);if(!v)return 0;if(v==1){for(var c=oNode.firstChild;c;c=c.nextSibling){if(c.nodeType==1){if(!iLevel)++iBranch;if(!xWalkEleTree(c,fnVisit,oData,iLevel+1,iBranch))return 0;}}}
return 1;}
function xWalkTree(oNode,fnVisit)
{fnVisit(oNode);for(var c=oNode.firstChild;c;c=c.nextSibling){if(c.nodeType==1)xWalkTree(c,fnVisit);}}
function xGetComputedStyle(oEle,sProp,bInt)
{var s,p='undefined';if(document.defaultView&&document.defaultView.getComputedStyle){s=document.defaultView.getComputedStyle(oEle,'');if(s)p=s.getPropertyValue(sProp);}
else if(oEle.currentStyle){var a=sProp.split('-');sProp=a[0];for(var i=1;i<a.length;++i){c=a[i].charAt(0);sProp+=a[i].replace(c,c.toUpperCase());}
p=oEle.currentStyle[sProp];}
return bInt?(parseInt(p)||0):p;}
function xGetElementsByClassName(clsName,parentEle,tagName,fn)
{var found=new Array();var re=new RegExp('\\b'+clsName+'\\b','i');var list=xGetElementsByTagName(tagName,parentEle);for(var i=0;i<list.length;++i){if(list[i].className.search(re)!=-1){found[found.length]=list[i];if(fn)fn(list[i]);}}
return found;}
function xGetElementsByTagName(tagName,parentEle)
{var list=null;tagName=tagName||'*';parentEle=parentEle||document;if(xIE4||xIE5){if(tagName=='*')list=parentEle.all;else list=parentEle.all.tags(tagName);}
else if(parentEle.getElementsByTagName)list=parentEle.getElementsByTagName(tagName);return list||new Array();}
function xGetElementsByAttribute(sTag,sAtt,sRE,fn)
{var a,list,found=new Array(),re=new RegExp(sRE,'i');list=xGetElementsByTagName(sTag);for(var i=0;i<list.length;++i){a=list[i].getAttribute(sAtt);if(!a){a=list[i][sAtt];}
if(typeof(a)=='string'&&a.search(re)!=-1){found[found.length]=list[i];if(fn)fn(list[i]);}}
return found;}
function xPrevSib(ele,tag)
{var s=ele?ele.previousSibling:null;if(tag)while(s&&s.nodeName!=tag){s=s.previousSibling;}
else while(s&&s.nodeType!=1){s=s.previousSibling;}
return s;}
function xNextSib(ele,tag)
{var s=ele?ele.nextSibling:null;if(tag)while(s&&s.nodeName!=tag){s=s.nextSibling;}
else while(s&&s.nodeType!=1){s=s.nextSibling;}
return s;}
function xFirstChild(ele,tag)
{var c=ele?ele.firstChild:null;if(tag)while(c&&c.nodeName!=tag){c=c.nextSibling;}
else while(c&&c.nodeType!=1){c=c.nextSibling;}
return c;}

function xAddEventListener(e,eventType,eventListener,useCapture)
{if(!(e=xGetElementById(e)))return;eventType=eventType.toLowerCase();if((!xIE4Up&&!xOp7)&&e==window){if(eventType=='resize'){window.xPCW=xClientWidth();window.xPCH=xClientHeight();window.xREL=eventListener;xResizeEvent();return;}
if(eventType=='scroll'){window.xPSL=xScrollLeft();window.xPST=xScrollTop();window.xSEL=eventListener;xScrollEvent();return;}}
var eh='e.on'+eventType+'=eventListener';if(e.addEventListener)e.addEventListener(eventType,eventListener,useCapture);else if(e.attachEvent)e.attachEvent('on'+eventType,eventListener);else eval(eh);}
function xRemoveEventListener(e,eventType,eventListener,useCapture)
{if(!(e=xGetElementById(e)))return;eventType=eventType.toLowerCase();if((!xIE4Up&&!xOp7)&&e==window){if(eventType=='resize'){window.xREL=null;return;}
if(eventType=='scroll'){window.xSEL=null;return;}}
var eh='e.on'+eventType+'=null';if(e.removeEventListener)e.removeEventListener(eventType,eventListener,useCapture);else if(e.detachEvent)e.detachEvent('on'+eventType,eventListener);else eval(eh);}
function xEvent(evt)
{this.type='';this.target=null;this.relatedTarget=null;this.pageX=0;this.pageY=0;this.keyCode=0;this.offsetX=0;this.offsetY=0;var e=evt||window.event;if(!e)return;if(e.type)this.type=e.type;if(e.target)this.target=e.target;else if(e.srcElement)this.target=e.srcElement;if(e.relatedTarget)this.relatedTarget=e.relatedTarget;else if(xIE4Up){if(e.type=='mouseover')this.relatedTarget=e.fromElement;else if(e.type=='mouseout')this.relatedTarget=e.toElement;}
if(xOp5or6){this.pageX=e.clientX;this.pageY=e.clientY;}
else if(xDef(e.pageX,e.pageY)){this.pageX=e.pageX;this.pageY=e.pageY;}
else if(xDef(e.clientX,e.clientY)){this.pageX=e.clientX+xScrollLeft();this.pageY=e.clientY+xScrollTop();}
if(xDef(e.offsetX,e.offsetY)){this.offsetX=e.offsetX;this.offsetY=e.offsetY;if(xIE4Up&&xMac){this.offsetX+=xScrollLeft();this.offsetY+=xScrollTop();}}
else if(xDef(e.layerX,e.layerY)){this.offsetX=e.layerX;this.offsetY=e.layerY;}
else{this.offsetX=this.pageX-xPageX(this.target);this.offsetY=this.pageY-xPageY(this.target);}
if(e.keyCode){this.keyCode=e.keyCode;}
else if(xDef(e.which)&&e.type.indexOf('key')!=-1){this.keyCode=e.which;}}
function xResizeEvent()
{if(window.xREL)setTimeout('xResizeEvent()',250);var cw=xClientWidth(),ch=xClientHeight();if(window.xPCW!=cw||window.xPCH!=ch){window.xPCW=cw;window.xPCH=ch;if(window.xREL)window.xREL();}}
function xScrollEvent()
{if(window.xSEL)setTimeout('xScrollEvent()',250);var sl=xScrollLeft(),st=xScrollTop();if(window.xPSL!=sl||window.xPST!=st){window.xPSL=sl;window.xPST=st;if(window.xSEL)window.xSEL();}}
function xStopPropagation(evt)
{if(evt&&evt.stopPropagation)evt.stopPropagation();else if(window.event)window.event.cancelBubble=true;}
function xPreventDefault(evt)
{if(evt&&evt.preventDefault)evt.preventDefault();else if(window.event)window.event.returnValue=false;}

var xDragMgr={ele:null,mm:false};function xEnableDrag(id,fnDragStart,fnDrag,fnDragEnd)
{var ele=xGetElementById(id);ele.xDraggable=true;ele.xOnDragStart=fnDragStart;ele.xOnDrag=fnDrag;ele.xOnDragEnd=fnDragEnd;xAddEventListener(ele,'mousedown',xdOnMousedown,false);if(!xDragMgr.mm){xDragMgr.mm=true;xAddEventListener(document,'mousemove',xdOnMousemove,false);}}
function xdOnMousedown(e)
{var evt=new xEvent(e);var ele=evt.target;while(ele&&!ele.xDraggable){ele=xParent(ele);}
if(ele){if(e&&e.preventDefault)e.preventDefault();else if(window.event)window.event.returnValue=false;ele.xDragX=evt.pageX;ele.xDragY=evt.pageY;xDragMgr.ele=ele;xAddEventListener(document,'mouseup',xdOnMouseup,false);if(ele.xOnDragStart){ele.xOnDragStart(ele,evt.pageX,evt.pageY);}}}
function xdOnMousemove(e)
{var evt=new xEvent(e);if(xDragMgr.ele){if(e&&e.preventDefault)e.preventDefault();else if(window.event)window.event.returnValue=false;var ele=xDragMgr.ele;var dx=evt.pageX-ele.xDragX;var dy=evt.pageY-ele.xDragY;ele.xDragX=evt.pageX;ele.xDragY=evt.pageY;if(ele.xOnDrag){ele.xOnDrag(ele,dx,dy);}
else{xMoveTo(ele,xLeft(ele)+dx,xTop(ele)+dy);}}}
function xdOnMouseup(e)
{if(xDragMgr.ele){if(e&&e.preventDefault)e.preventDefault();else if(window.event)window.event.returnValue=false;xRemoveEventListener(document,'mouseup',xdOnMouseup,false);if(xDragMgr.ele.xOnDragEnd){var evt=new xEvent(e);xDragMgr.ele.xOnDragEnd(xDragMgr.ele,evt.pageX,evt.pageY);}
xDragMgr.ele=null;}}

function Menu(label,mw,mh,fnt,fs,fclr,fhclr,bg,bgh,halgn,valgn,pad,space,to,sx,sy,srel,opq,vert,idt,aw,ah)
{this.version="020320 [Menu; mm_menu.js]";this.type="Menu";this.menuWidth=mw;this.menuItemHeight=mh;this.fontSize=fs;this.fontWeight="plain";this.fontFamily=fnt;this.fontColor=fclr;this.fontColorHilite=fhclr;this.bgColor="#555555";this.menuBorder=1;this.menuBgOpaque=opq;this.menuItemBorder=1;this.menuItemIndent=idt;this.menuItemBgColor=bg;this.menuItemVAlign=valgn;this.menuItemHAlign=halgn;this.menuItemPadding=pad;this.menuItemSpacing=space;this.menuLiteBgColor="#ffffff";this.menuBorderBgColor="#777777";this.menuHiliteBgColor=bgh;this.menuContainerBgColor="#cccccc";this.childMenuIcon="arrows.gif";this.submenuXOffset=sx;this.submenuYOffset=sy;this.submenuRelativeToItem=srel;this.vertical=vert;this.items=new Array();this.actions=new Array();this.childMenus=new Array();this.hideOnMouseOut=true;this.hideTimeout=to;this.addMenuItem=addMenuItem;this.writeMenus=writeMenus;this.MM_showMenu=MM_showMenu;this.onMenuItemOver=onMenuItemOver;this.onMenuItemAction=onMenuItemAction;this.hideMenu=hideMenu;this.hideChildMenu=hideChildMenu;if(!window.menus)window.menus=new Array();this.label=" "+label;window.menus[this.label]=this;window.menus[window.menus.length]=this;if(!window.activeMenus)window.activeMenus=new Array();}
function addMenuItem(label,action){this.items[this.items.length]=label;this.actions[this.actions.length]=action;}
function FIND(item){if(window.mmIsOpera)return(document.getElementById(item));if(document.all)return(document.all[item]);if(document.getElementById)return(document.getElementById(item));return(false);}
function writeMenus(container){if(window.triedToWriteMenus)return;var agt=navigator.userAgent.toLowerCase();window.mmIsOpera=agt.indexOf("opera")!=-1;if(!container&&document.layers){window.delayWriteMenus=this.writeMenus;var timer=setTimeout('delayWriteMenus()',500);container=new Layer(100);clearTimeout(timer);}else if(document.all||document.hasChildNodes||window.mmIsOpera){document.writeln('<span id="menuContainer"></span>');container=FIND("menuContainer");}
window.mmHideMenuTimer=null;if(!container)return;window.triedToWriteMenus=true;container.isContainer=true;container.menus=new Array();for(var i=0;i<window.menus.length;i++)
container.menus[i]=window.menus[i];window.menus.length=0;var countMenus=0;var countItems=0;var top=0;var content='';var lrs=false;var theStat="";var tsc=0;if(document.layers)lrs=true;for(var i=0;i<container.menus.length;i++,countMenus++){var menu=container.menus[i];if(menu.bgImageUp||!menu.menuBgOpaque){menu.menuBorder=0;menu.menuItemBorder=0;}
if(lrs){var menuLayer=new Layer(100,container);var lite=new Layer(100,menuLayer);lite.top=menu.menuBorder;lite.left=menu.menuBorder;var body=new Layer(100,lite);body.top=menu.menuBorder;body.left=menu.menuBorder;}else{content+=''+'<div id="menuLayer'+countMenus+'" style="position:absolute;z-index:1;left:10px;top:'+(i*100)+'px;visibility:hidden;color:'+menu.menuBorderBgColor+';">\n'+'  <div id="menuLite'+countMenus+'" style="position:absolute;z-index:1;left:'+menu.menuBorder+'px;top:'+menu.menuBorder+'px;visibility:hide;" onmouseout="mouseoutMenu();">\n'+'  <div id="menuFg'+countMenus+'" style="position:absolute;left:'+menu.menuBorder+'px;top:'+menu.menuBorder+'px;visibility:hide;">\n'+'';}
var x=i;for(var i=0;i<menu.items.length;i++){var item=menu.items[i];var childMenu=false;var defaultHeight=menu.fontSize+2*menu.menuItemPadding;if(item.label){item=item.label;childMenu=true;}
menu.menuItemHeight=menu.menuItemHeight||defaultHeight;var itemProps='';if(menu.fontFamily!='')itemProps+='font-family:'+menu.fontFamily+';';itemProps+='font-weight:'+menu.fontWeight+';fontSize:'+menu.fontSize+'px;';if(menu.fontStyle)itemProps+='font-style:'+menu.fontStyle+';';if(document.all||window.mmIsOpera)
itemProps+='font-size:'+menu.fontSize+'px;" onmouseover="onMenuItemOver(null,this);" onclick="onMenuItemAction(null,this);';else if(!document.layers){itemProps+='font-size:'+menu.fontSize+'px;';}
var l;if(lrs){var lw=menu.menuWidth;if(menu.menuItemHAlign=='right')lw-=menu.menuItemPadding;l=new Layer(lw,body);}
var itemLeft=0;var itemTop=i*menu.menuItemHeight;if(!menu.vertical){itemLeft=i*menu.menuWidth;itemTop=0;}
var dTag='<div id="menuItem'+countItems+'" style="position:absolute;left:'+itemLeft+'px;top:'+itemTop+'px;'+itemProps+'">';var dClose='</div>'
if(menu.bgImageUp)dTag='<div id="menuItem'+countItems+'" style="background:url('+menu.bgImageUp+');position:absolute;left:'+itemLeft+'px;top:'+itemTop+'px;'+itemProps+'">';var left=0,top=0,right=0,bottom=0;left=1+menu.menuItemPadding+menu.menuItemIndent;right=left+menu.menuWidth-2*menu.menuItemPadding-menu.menuItemIndent;if(menu.menuItemVAlign=='top')top=menu.menuItemPadding;if(menu.menuItemVAlign=='bottom')top=menu.menuItemHeight-menu.fontSize-1-menu.menuItemPadding;if(menu.menuItemVAlign=='middle')top=((menu.menuItemHeight/2)-(menu.fontSize/2)-1);bottom=menu.menuItemHeight-2*menu.menuItemPadding;var textProps='position:absolute;left:'+left+'px;top:'+top+'px;';if(lrs){textProps+=itemProps+'right:'+right+';bottom:'+bottom+';';dTag="";dClose="";}
if(document.all&&!window.mmIsOpera){item='<div align="'+menu.menuItemHAlign+'">'+item+'</div>';}else if(lrs){item='<div style="text-align:'+menu.menuItemHAlign+';">'+item+'</div>';}else{var hitem=null;if(menu.menuItemHAlign!='left'){if(window.mmIsOpera){var operaWidth=menu.menuItemHAlign=='center'?-(menu.menuWidth-2*menu.menuItemPadding):(menu.menuWidth-6*menu.menuItemPadding);hitem='<div id="menuItemHilite'+countItems+'Shim" style="position:absolute;top:1px;left:'+menu.menuItemPadding+'px;width:'+operaWidth+'px;text-align:'
+menu.menuItemHAlign+';visibility:visible;">'+item+'</div>';item='<div id="menuItemText'+countItems+'Shim" style="position:absolute;top:1px;left:'+menu.menuItemPadding+'px;width:'+operaWidth+'px;text-align:'
+menu.menuItemHAlign+';visibility:visible;">'+item+'</div>';}else{hitem='<div id="menuItemHilite'+countItems+'Shim" style="position:absolute;top:1px;left:1px;right:-'+(left+menu.menuWidth-3*menu.menuItemPadding)+'px;text-align:'
+menu.menuItemHAlign+';visibility:visible;">'+item+'</div>';item='<div id="menuItemText'+countItems+'Shim" style="position:absolute;top:1px;left:1px;right:-'+(left+menu.menuWidth-3*menu.menuItemPadding)+'px;text-align:'
+menu.menuItemHAlign+';visibility:visible;">'+item+'</div>';}}else hitem=null;}
if(document.all&&!window.mmIsOpera)item='<div id="menuItemShim'+countItems+'" style="position:absolute;left:0px;top:0px;">'+item+'</div>';var dText='<div id="menuItemText'+countItems+'" style="'+textProps+'color:'+menu.fontColor+';">'+item+'&nbsp</div>\n'
+'<div id="menuItemHilite'+countItems+'" style="'+textProps+'color:'+menu.fontColorHilite+';visibility:hidden;">'
+(hitem||item)+'&nbsp</div>';if(childMenu)content+=(dTag+dText+'<div id="childMenu'+countItems+'" style="position:absolute;left:0px;top:3px;"><img src="'+menu.childMenuIcon+'"></div>\n'+dClose);else content+=(dTag+dText+dClose);if(lrs){l.document.open("text/html");l.document.writeln(content);l.document.close();content='';theStat+="-";tsc++;if(tsc>50){tsc=0;theStat="";}
status=theStat;}
countItems++;}
if(lrs){var focusItem=new Layer(100,body);focusItem.visiblity="hidden";focusItem.document.open("text/html");focusItem.document.writeln("&nbsp;");focusItem.document.close();}else{content+='   <div id="focusItem'+countMenus+'" style="position:absolute;left:0px;top:0px;visibility:hide;" onclick="onMenuItemAction(null,this);">&nbsp;</div>\n';content+='   </div>\n  </div>\n</div>\n';}
i=x;}
if(document.layers){container.clip.width=window.innerWidth;container.clip.height=window.innerHeight;container.onmouseout=mouseoutMenu;container.menuContainerBgColor=this.menuContainerBgColor;for(var i=0;i<container.document.layers.length;i++){proto=container.menus[i];var menu=container.document.layers[i];container.menus[i].menuLayer=menu;container.menus[i].menuLayer.Menu=container.menus[i];container.menus[i].menuLayer.Menu.container=container;var body=menu.document.layers[0].document.layers[0];body.clip.width=proto.menuWidth||body.clip.width;body.clip.height=proto.menuHeight||body.clip.height;for(var n=0;n<body.document.layers.length-1;n++){var l=body.document.layers[n];l.Menu=container.menus[i];l.menuHiliteBgColor=proto.menuHiliteBgColor;l.document.bgColor=proto.menuItemBgColor;l.saveColor=proto.menuItemBgColor;l.onmouseover=proto.onMenuItemOver;l.onclick=proto.onMenuItemAction;l.mmaction=container.menus[i].actions[n];l.focusItem=body.document.layers[body.document.layers.length-1];l.clip.width=proto.menuWidth||body.clip.width;l.clip.height=proto.menuItemHeight||l.clip.height;if(n>0){if(l.Menu.vertical)l.top=body.document.layers[n-1].top+body.document.layers[n-1].clip.height+proto.menuItemBorder+proto.menuItemSpacing;else l.left=body.document.layers[n-1].left+body.document.layers[n-1].clip.width+proto.menuItemBorder+proto.menuItemSpacing;}
l.hilite=l.document.layers[1];if(proto.bgImageUp)l.background.src=proto.bgImageUp;l.document.layers[1].isHilite=true;if(l.document.layers.length>2){l.childMenu=container.menus[i].items[n].menuLayer;l.document.layers[2].left=l.clip.width-13;l.document.layers[2].top=(l.clip.height/2)-4;l.document.layers[2].clip.left+=3;l.Menu.childMenus[l.Menu.childMenus.length]=l.childMenu;}}
if(proto.menuBgOpaque)body.document.bgColor=proto.bgColor;if(proto.vertical){body.clip.width=l.clip.width+proto.menuBorder;body.clip.height=l.top+l.clip.height+proto.menuBorder;}else{body.clip.height=l.clip.height+proto.menuBorder;body.clip.width=l.left+l.clip.width+proto.menuBorder;if(body.clip.width>window.innerWidth)body.clip.width=window.innerWidth;}
var focusItem=body.document.layers[n];focusItem.clip.width=body.clip.width;focusItem.Menu=l.Menu;focusItem.top=-30;focusItem.captureEvents(Event.MOUSEDOWN);focusItem.onmousedown=onMenuItemDown;if(proto.menuBgOpaque)menu.document.bgColor=proto.menuBorderBgColor;var lite=menu.document.layers[0];if(proto.menuBgOpaque)lite.document.bgColor=proto.menuLiteBgColor;lite.clip.width=body.clip.width+1;lite.clip.height=body.clip.height+1;menu.clip.width=body.clip.width+(proto.menuBorder*3);menu.clip.height=body.clip.height+(proto.menuBorder*3);}}else{if((!document.all)&&(container.hasChildNodes)&&!window.mmIsOpera){container.innerHTML=content;}else{container.document.open("text/html");container.document.writeln(content);container.document.close();}
if(!FIND("menuLayer0"))return;var menuCount=0;for(var x=0;x<container.menus.length;x++){var menuLayer=FIND("menuLayer"+x);container.menus[x].menuLayer="menuLayer"+x;menuLayer.Menu=container.menus[x];menuLayer.Menu.container="menuLayer"+x;menuLayer.style.zindex=1;var s=menuLayer.style;s.pixeltop=-300;s.pixelleft=-300;s.top='-300px';s.left='-300px';var menu=container.menus[x];menu.menuItemWidth=menu.menuWidth||menu.menuIEWidth||140;if(menu.menuBgOpaque)menuLayer.style.backgroundColor=menu.menuBorderBgColor;var top=0;var left=0;menu.menuItemLayers=new Array();for(var i=0;i<container.menus[x].items.length;i++){var l=FIND("menuItem"+menuCount);l.Menu=container.menus[x];l.Menu.menuItemLayers[l.Menu.menuItemLayers.length]=l;if(l.addEventListener||window.mmIsOpera){l.style.width=menu.menuItemWidth+'px';l.style.height=menu.menuItemHeight+'px';l.style.pixelWidth=menu.menuItemWidth;l.style.pixelHeight=menu.menuItemHeight;l.style.top=top+'px';l.style.left=left+'px';if(l.addEventListener){l.addEventListener("mouseover",onMenuItemOver,false);l.addEventListener("click",onMenuItemAction,false);l.addEventListener("mouseout",mouseoutMenu,false);}
if(menu.menuItemHAlign!='left'){l.hiliteShim=FIND("menuItemHilite"+menuCount+"Shim");l.hiliteShim.style.visibility="inherit";l.textShim=FIND("menuItemText"+menuCount+"Shim");l.hiliteShim.style.pixelWidth=menu.menuItemWidth-2*menu.menuItemPadding-menu.menuItemIndent;l.hiliteShim.style.width=l.hiliteShim.style.pixelWidth;l.textShim.style.pixelWidth=menu.menuItemWidth-2*menu.menuItemPadding-menu.menuItemIndent;l.textShim.style.width=l.textShim.style.pixelWidth;}}else{l.style.pixelWidth=menu.menuItemWidth;l.style.pixelHeight=menu.menuItemHeight;l.style.pixelTop=top;l.style.pixelLeft=left;if(menu.menuItemHAlign!='left'){var shim=FIND("menuItemShim"+menuCount);shim[0].style.pixelWidth=menu.menuItemWidth-2*menu.menuItemPadding-menu.menuItemIndent;shim[1].style.pixelWidth=menu.menuItemWidth-2*menu.menuItemPadding-menu.menuItemIndent;shim[0].style.width=shim[0].style.pixelWidth+'px';shim[1].style.width=shim[1].style.pixelWidth+'px';}}
if(menu.vertical)top=top+menu.menuItemHeight+menu.menuItemBorder+menu.menuItemSpacing;else left=left+menu.menuItemWidth+menu.menuItemBorder+menu.menuItemSpacing;l.style.fontSize=menu.fontSize+'px';l.style.backgroundColor=menu.menuItemBgColor;l.style.visibility="inherit";l.saveColor=menu.menuItemBgColor;l.menuHiliteBgColor=menu.menuHiliteBgColor;l.mmaction=container.menus[x].actions[i];l.hilite=FIND("menuItemHilite"+menuCount);l.focusItem=FIND("focusItem"+x);l.focusItem.style.pixelTop=-30;l.focusItem.style.top='-30px';var childItem=FIND("childMenu"+menuCount);if(childItem){l.childMenu=container.menus[x].items[i].menuLayer;childItem.style.pixelLeft=menu.menuItemWidth-11;childItem.style.left=childItem.style.pixelLeft+'px';childItem.style.pixelTop=(menu.menuItemHeight/2)-4;childItem.style.top=childItem.style.pixelTop+'px';l.Menu.childMenus[l.Menu.childMenus.length]=l.childMenu;}
l.style.cursor="hand";menuCount++;}
if(menu.vertical){menu.menuHeight=top-1-menu.menuItemSpacing;menu.menuWidth=menu.menuItemWidth;}else{menu.menuHeight=menu.menuItemHeight;menu.menuWidth=left-1-menu.menuItemSpacing;}
var lite=FIND("menuLite"+x);var s=lite.style;s.pixelHeight=menu.menuHeight+(menu.menuBorder*2);s.height=s.pixelHeight+'px';s.pixelWidth=menu.menuWidth+(menu.menuBorder*2);s.width=s.pixelWidth+'px';if(menu.menuBgOpaque)s.backgroundColor=menu.menuLiteBgColor;var body=FIND("menuFg"+x);s=body.style;s.pixelHeight=menu.menuHeight+menu.menuBorder;s.height=s.pixelHeight+'px';s.pixelWidth=menu.menuWidth+menu.menuBorder;s.width=s.pixelWidth+'px';if(menu.menuBgOpaque)s.backgroundColor=menu.bgColor;s=menuLayer.style;s.pixelWidth=menu.menuWidth+(menu.menuBorder*4);s.width=s.pixelWidth+'px';s.pixelHeight=menu.menuHeight+(menu.menuBorder*4);s.height=s.pixelHeight+'px';}}
if(document.captureEvents)document.captureEvents(Event.MOUSEUP);if(document.addEventListener)document.addEventListener("mouseup",onMenuItemOver,false);if(document.layers&&window.innerWidth){window.onresize=NS4resize;window.NS4sIW=window.innerWidth;window.NS4sIH=window.innerHeight;setTimeout("NS4resize()",500);}
document.onmouseup=mouseupMenu;window.mmWroteMenu=true;status="";}
function NS4resize(){if(NS4sIW!=window.innerWidth||NS4sIH!=window.innerHeight)window.location.reload();}
function onMenuItemOver(e,l){MM_clearTimeout();l=l||this;a=window.ActiveMenuItem;if(document.layers){if(a){a.document.bgColor=a.saveColor;if(a.hilite)a.hilite.visibility="hidden";if(a.Menu.bgImageOver)a.background.src=a.Menu.bgImageUp;a.focusItem.top=-100;a.clicked=false;}
if(l.hilite){l.document.bgColor=l.menuHiliteBgColor;l.zIndex=1;l.hilite.visibility="inherit";l.hilite.zIndex=2;l.document.layers[1].zIndex=1;l.focusItem.zIndex=this.zIndex+2;}
if(l.Menu.bgImageOver)l.background.src=l.Menu.bgImageOver;l.focusItem.top=this.top;l.focusItem.left=this.left;l.focusItem.clip.width=l.clip.width;l.focusItem.clip.height=l.clip.height;l.Menu.hideChildMenu(l);}else if(l.style&&l.Menu){if(a){a.style.backgroundColor=a.saveColor;if(a.hilite)a.hilite.style.visibility="hidden";if(a.hiliteShim)a.hiliteShim.style.visibility="inherit";if(a.Menu.bgImageUp)a.style.background="url("+a.Menu.bgImageUp+")";;}
l.style.backgroundColor=l.menuHiliteBgColor;l.zIndex=1;if(l.Menu.bgImageOver)l.style.background="url("+l.Menu.bgImageOver+")";if(l.hilite){l.hilite.style.visibility="inherit";if(l.hiliteShim)l.hiliteShim.style.visibility="visible";}
l.focusItem.style.pixelTop=l.style.pixelTop;l.focusItem.style.top=l.focusItem.style.pixelTop+'px';l.focusItem.style.pixelLeft=l.style.pixelLeft;l.focusItem.style.left=l.focusItem.style.pixelLeft+'px';l.focusItem.style.zIndex=l.zIndex+1;l.Menu.hideChildMenu(l);}else return;window.ActiveMenuItem=l;}
function onMenuItemAction(e,l){l=window.ActiveMenuItem;if(!l)return;hideActiveMenus();if(l.mmaction)eval(""+l.mmaction);window.ActiveMenuItem=0;}
function MM_clearTimeout(){if(mmHideMenuTimer)clearTimeout(mmHideMenuTimer);mmHideMenuTimer=null;mmDHFlag=false;}
function MM_startTimeout(){if(window.ActiveMenu){mmStart=new Date();mmDHFlag=true;mmHideMenuTimer=setTimeout("mmDoHide()",window.ActiveMenu.Menu.hideTimeout);}}
function mmDoHide(){if(!mmDHFlag||!window.ActiveMenu)return;var elapsed=new Date()-mmStart;var timeout=window.ActiveMenu.Menu.hideTimeout;if(elapsed<timeout){mmHideMenuTimer=setTimeout("mmDoHide()",timeout+100-elapsed);return;}
mmDHFlag=false;hideActiveMenus();window.ActiveMenuItem=0;}
function MM_showMenu(menu,x,y,child,imgname){if(!window.mmWroteMenu)return;MM_clearTimeout();if(menu){var obj=FIND(imgname)||document.images[imgname]||document.links[imgname]||document.anchors[imgname];x=moveXbySlicePos(x,obj);y=moveYbySlicePos(y,obj);}
if(document.layers){if(menu){var l=menu.menuLayer||menu;l.top=l.left=1;hideActiveMenus();if(this.visibility)l=this;window.ActiveMenu=l;}else{var l=child;}
if(!l)return;for(var i=0;i<l.layers.length;i++){if(!l.layers[i].isHilite)l.layers[i].visibility="inherit";if(l.layers[i].document.layers.length>0)MM_showMenu(null,"relative","relative",l.layers[i]);}
if(l.parentLayer){if(x!="relative")l.parentLayer.left=x||window.pageX||0;if(l.parentLayer.left+l.clip.width>window.innerWidth)l.parentLayer.left-=(l.parentLayer.left+l.clip.width-window.innerWidth);if(y!="relative")l.parentLayer.top=y||window.pageY||0;if(l.parentLayer.isContainer){l.Menu.xOffset=window.pageXOffset;l.Menu.yOffset=window.pageYOffset;l.parentLayer.clip.width=window.ActiveMenu.clip.width+2;l.parentLayer.clip.height=window.ActiveMenu.clip.height+2;if(l.parentLayer.menuContainerBgColor&&l.Menu.menuBgOpaque)l.parentLayer.document.bgColor=l.parentLayer.menuContainerBgColor;}}
l.visibility="inherit";if(l.Menu)l.Menu.container.visibility="inherit";}else if(FIND("menuItem0")){var l=menu.menuLayer||menu;hideActiveMenus();if(typeof(l)=="string")l=FIND(l);window.ActiveMenu=l;var s=l.style;s.visibility="inherit";if(x!="relative"){s.pixelLeft=x||(window.pageX+document.body.scrollLeft)||0;s.left=s.pixelLeft+'px';}
if(y!="relative"){s.pixelTop=y||(window.pageY+document.body.scrollTop)||0;s.top=s.pixelTop+'px';}
l.Menu.xOffset=document.body.scrollLeft;l.Menu.yOffset=document.body.scrollTop;}
if(menu)window.activeMenus[window.activeMenus.length]=l;MM_clearTimeout();}
function onMenuItemDown(e,l){var a=window.ActiveMenuItem;if(document.layers&&a){a.eX=e.pageX;a.eY=e.pageY;a.clicked=true;}}
function mouseupMenu(e){hideMenu(true,e);hideActiveMenus();return true;}
function getExplorerVersion(){var ieVers=parseFloat(navigator.appVersion);if(navigator.appName!='Microsoft Internet Explorer')return ieVers;var tempVers=navigator.appVersion;var i=tempVers.indexOf('MSIE ');if(i>=0){tempVers=tempVers.substring(i+5);ieVers=parseFloat(tempVers);}
return ieVers;}
function mouseoutMenu(){if((navigator.appName=="Microsoft Internet Explorer")&&(getExplorerVersion()<4.5))
return true;hideMenu(false,false);return true;}
function hideMenu(mouseup,e){var a=window.ActiveMenuItem;if(a&&document.layers){a.document.bgColor=a.saveColor;a.focusItem.top=-30;if(a.hilite)a.hilite.visibility="hidden";if(mouseup&&a.mmaction&&a.clicked&&window.ActiveMenu){if(a.eX<=e.pageX+15&&a.eX>=e.pageX-15&&a.eY<=e.pageY+10&&a.eY>=e.pageY-10){setTimeout('window.ActiveMenu.Menu.onMenuItemAction();',500);}}
a.clicked=false;if(a.Menu.bgImageOver)a.background.src=a.Menu.bgImageUp;}else if(window.ActiveMenu&&FIND("menuItem0")){if(a){a.style.backgroundColor=a.saveColor;if(a.hilite)a.hilite.style.visibility="hidden";if(a.hiliteShim)a.hiliteShim.style.visibility="inherit";if(a.Menu.bgImageUp)a.style.background="url("+a.Menu.bgImageUp+")";}}
if(!mouseup&&window.ActiveMenu){if(window.ActiveMenu.Menu){if(window.ActiveMenu.Menu.hideOnMouseOut)MM_startTimeout();return(true);}}
return(true);}
function hideChildMenu(hcmLayer){MM_clearTimeout();var l=hcmLayer;for(var i=0;i<l.Menu.childMenus.length;i++){var theLayer=l.Menu.childMenus[i];if(document.layers)theLayer.visibility="hidden";else{theLayer=FIND(theLayer);theLayer.style.visibility="hidden";if(theLayer.Menu.menuItemHAlign!='left'){for(var j=0;j<theLayer.Menu.menuItemLayers.length;j++){var itemLayer=theLayer.Menu.menuItemLayers[j];if(itemLayer.textShim)itemLayer.textShim.style.visibility="inherit";}}}
theLayer.Menu.hideChildMenu(theLayer);}
if(l.childMenu){var childMenu=l.childMenu;if(document.layers){l.Menu.MM_showMenu(null,null,null,childMenu.layers[0]);childMenu.zIndex=l.parentLayer.zIndex+1;childMenu.top=l.Menu.menuLayer.top+l.Menu.submenuYOffset;if(l.Menu.vertical){if(l.Menu.submenuRelativeToItem)childMenu.top+=l.top+l.parentLayer.top;childMenu.left=l.parentLayer.left+l.parentLayer.clip.width-(2*l.Menu.menuBorder)+l.Menu.menuLayer.left+l.Menu.submenuXOffset;}else{childMenu.top+=l.top+l.parentLayer.top;if(l.Menu.submenuRelativeToItem)childMenu.left=l.Menu.menuLayer.left+l.left+l.clip.width+(2*l.Menu.menuBorder)+l.Menu.submenuXOffset;else childMenu.left=l.parentLayer.left+l.parentLayer.clip.width-(2*l.Menu.menuBorder)+l.Menu.menuLayer.left+l.Menu.submenuXOffset;}
if(childMenu.left<l.Menu.container.clip.left)l.Menu.container.clip.left=childMenu.left;var w=childMenu.clip.width+childMenu.left-l.Menu.container.clip.left;if(w>l.Menu.container.clip.width)l.Menu.container.clip.width=w;var h=childMenu.clip.height+childMenu.top-l.Menu.container.clip.top;if(h>l.Menu.container.clip.height)l.Menu.container.clip.height=h;l.document.layers[1].zIndex=0;childMenu.visibility="inherit";}else if(FIND("menuItem0")){childMenu=FIND(l.childMenu);var menuLayer=FIND(l.Menu.menuLayer);var s=childMenu.style;s.zIndex=menuLayer.style.zIndex+1;if(document.all||window.mmIsOpera){s.pixelTop=menuLayer.style.pixelTop+l.Menu.submenuYOffset;if(l.Menu.vertical){if(l.Menu.submenuRelativeToItem)s.pixelTop+=l.style.pixelTop;s.pixelLeft=l.style.pixelWidth+menuLayer.style.pixelLeft+l.Menu.submenuXOffset;s.left=s.pixelLeft+'px';}else{s.pixelTop+=l.style.pixelTop;if(l.Menu.submenuRelativeToItem)s.pixelLeft=menuLayer.style.pixelLeft+l.style.pixelLeft+l.style.pixelWidth+(2*l.Menu.menuBorder)+l.Menu.submenuXOffset;else s.pixelLeft=(menuLayer.style.pixelWidth-4*l.Menu.menuBorder)+menuLayer.style.pixelLeft+l.Menu.submenuXOffset;s.left=s.pixelLeft+'px';}}else{var top=parseInt(menuLayer.style.top)+l.Menu.submenuYOffset;var left=0;if(l.Menu.vertical){if(l.Menu.submenuRelativeToItem)top+=parseInt(l.style.top);left=(parseInt(menuLayer.style.width)-4*l.Menu.menuBorder)+parseInt(menuLayer.style.left)+l.Menu.submenuXOffset;}else{top+=parseInt(l.style.top);if(l.Menu.submenuRelativeToItem)left=parseInt(menuLayer.style.left)+parseInt(l.style.left)+parseInt(l.style.width)+(2*l.Menu.menuBorder)+l.Menu.submenuXOffset;else left=(parseInt(menuLayer.style.width)-4*l.Menu.menuBorder)+parseInt(menuLayer.style.left)+l.Menu.submenuXOffset;}
s.top=top+'px';s.left=left+'px';}
childMenu.style.visibility="inherit";}else return;window.activeMenus[window.activeMenus.length]=childMenu;}}
function hideActiveMenus(){if(!window.activeMenus)return;for(var i=0;i<window.activeMenus.length;i++){if(!activeMenus[i])continue;if(activeMenus[i].visibility&&activeMenus[i].Menu&&!window.mmIsOpera){activeMenus[i].visibility="hidden";activeMenus[i].Menu.container.visibility="hidden";activeMenus[i].Menu.container.clip.left=0;}else if(activeMenus[i].style){var s=activeMenus[i].style;s.visibility="hidden";s.left='-200px';s.top='-200px';}}
if(window.ActiveMenuItem)hideMenu(false,false);window.activeMenus.length=0;}
function moveXbySlicePos(x,img){if(!document.layers){var onWindows=navigator.platform?navigator.platform=="Win32":false;var macIE45=document.all&&!onWindows&&getExplorerVersion()==4.5;var par=img;var lastOffset=0;while(par){if(par.leftMargin&&!onWindows)x+=parseInt(par.leftMargin);if((par.offsetLeft!=lastOffset)&&par.offsetLeft)x+=parseInt(par.offsetLeft);if(par.offsetLeft!=0)lastOffset=par.offsetLeft;par=macIE45?par.parentElement:par.offsetParent;}}else if(img.x)x+=img.x;return x;}
function moveYbySlicePos(y,img){if(!document.layers){var onWindows=navigator.platform?navigator.platform=="Win32":false;var macIE45=document.all&&!onWindows&&getExplorerVersion()==4.5;var par=img;var lastOffset=0;while(par){if(par.topMargin&&!onWindows)y+=parseInt(par.topMargin);if((par.offsetTop!=lastOffset)&&par.offsetTop)y+=parseInt(par.offsetTop);if(par.offsetTop!=0)lastOffset=par.offsetTop;par=macIE45?par.parentElement:par.offsetParent;}}else if(img.y>=0)y+=img.y;return y;}

var digits="0123456789";var lowercaseLetters="abcdefghijklmnopqrstuvwxyz"
var uppercaseLetters="ABCDEFGHIJKLMNOPQRSTUVWXYZ"
var whitespace=" \t\n\r";var illegalemailchars=" !#$%^&*()|/<>"
var decimalPointDelimiter="."
var phoneNumberDelimiters="()- ";var validUSPhoneChars=digits+phoneNumberDelimiters;var validWorldPhoneChars=digits+phoneNumberDelimiters+"+";var SSNDelimiters="- ";var validSSNChars=digits+SSNDelimiters;var digitsInSocialSecurityNumber=9;var digitsInUSPhoneNumber=10;var ZIPCodeDelimiters="-";var ZIPCodeDelimeter="-"
var validZIPCodeChars=digits+ZIPCodeDelimiters
var digitsInZIPCode1=5
var digitsInZIPCode2=9
var creditCardDelimiters=" "
var mPrefix="You did not enter a value into the "
var mSuffix=" field. This is a required field. Please enter it now."
var sUSLastName="Last Name"
var sUSFirstName="First Name"
var sCompanyName="Company Name"
var sWorldLastName="Family Name"
var sWorldFirstName="Given Name"
var sTitle="Title"
var sBusinessName="Business Name"
var sCompanyName="Company Name"
var sUSAddress1="Street Address"
var sUSAddress2="Street Address"
var sWorldAddress="Address"
var sUSCity="City"
var sStateCode="State Code"
var sWorldState="State, Province, or Prefecture"
var sCountry="Country"
var sZIPCode="ZIP Code"
var sWorldPostalCode="Postal Code"
var sPhone="Phone Number"
var sFax="Fax Number"
var sWebsite="Website"
var sDateOfBirth="Date of Birth"
var sExpirationDate="Expiration Date"
var sEmail="Email"
var sSSN="Social Security Number"
var sCreditCardNumber="Credit Card Number"
var sOtherInfo="Other Information"
var sYear="Year"
var sPrice="Price"
var sScreenName="Screen Name"
var sResponse="Response"
var sAccountNumber="Account Number"
var iStateCode="This field must be a valid two character U.S. state abbreviation (CA for California). Please reenter."
var iZIPCode="This field must be a 5 or 9 digit U.S. ZIP Code (example: 94043). Please reenter."
var iUSPhone="This field must be a 10 digit U.S. phone number (example: 415 555 1212). Please reenter."
var iWorldPhone="This field must be a valid international phone number. Please reenter."
var iSSN="This field must be a 9 digit U.S. social security number (example: 123 45 6789). Please reenter."
var iEmail="This field must be a valid email address (example: name@domain.com). Spaces and symbols are not allowed. Please reenter."
var iCreditCardPrefix="This is not a valid "
var iCreditCardSuffix=" credit card number. (Click the link on this form to see a list of sample numbers.) Please reenter."
var iDay="This field must be a day number between 1 and 31.  Please reenter."
var iMonth="This field must be a month number between 1 and 12.  Please reenter."
var iYear="The Year must be a 4 digit year number.  Please reenter."
var iDatePrefix="The Day, Month, and Year for "
var iDateSuffix=" do not form a valid date.  Please reenter."
var iNumber="Not a valid entry.  Please enter a valid number."
var pEntryPrompt="Please enter a "
var pStateCode="State"
var pCounrty="Country"
var pZIPCode="5 or 9 digit U.S. ZIP Code (example: 94043)."
var pUSPhone="10 digit U.S. phone number (example: 415 555 1212)."
var pWorldPhone="international phone number."
var pSSN="9 digit U.S. social security number (example: 123 45 6789)."
var pEmail="valid email address (example: name@domain.com)."
var pBusinessName="business name (example:ACME Corporation)."
var pWebsite="valid website URL (example: www.google.com)."
var pCreditCard="valid credit card number."
var pExpiration="credit card expiration date."
var pDay="day number between 1 and 31."
var pMonth="month number between 1 and 12."
var pYear="4 digit year number."
var defaultEmptyOK=false
function makeArray(n){for(var i=1;i<=n;i++){this[i]=0}
return this}
var daysInMonth=makeArray(12);daysInMonth[1]=31;daysInMonth[2]=29;daysInMonth[3]=31;daysInMonth[4]=30;daysInMonth[5]=31;daysInMonth[6]=30;daysInMonth[7]=31;daysInMonth[8]=31;daysInMonth[9]=30;daysInMonth[10]=31;daysInMonth[11]=30;daysInMonth[12]=31;var USStateCodeDelimiter="|";var USStateCodes="AL|AK|AS|AZ|AR|CA|CO|CT|DE|DC|FM|FL|GA|GU|HI|ID|IL|IN|IA|KS|KY|LA|ME|MH|MD|MA|MI|MN|MS|MO|MT|NE|NV|NH|NJ|NM|NY|NC|ND|MP|OH|OK|OR|PW|PA|PR|RI|SC|SD|TN|TX|UT|VT|VI|VA|WA|WV|WI|WY|AE|AA|AE|AE|AP"
function isEmpty(s)
{return((s==null)||(s.length==0)||(s==""))}
function ContainsInvalidEmailChars(s)
{var i;for(i=0;i<s.length;i++)
{var c=s.charAt(i);if(illegalemailchars.indexOf(c)>-1)return true;}
return false;}
function isWhitespace(s)
{var i;if(isEmpty(s))return true;for(i=0;i<s.length;i++)
{var c=s.charAt(i);if(whitespace.indexOf(c)==-1)return false;}
return true;}
function stripCharsInBag(s,bag)
{var i;var returnString="";for(i=0;i<s.length;i++)
{var c=s.charAt(i);if(bag.indexOf(c)==-1)returnString+=c;}
return returnString;}
function stripCharsNotInBag(s,bag)
{var i;var returnString="";for(i=0;i<s.length;i++)
{var c=s.charAt(i);if(bag.indexOf(c)!=-1)returnString+=c;}
return returnString;}
function stripWhitespace(s)
{return stripCharsInBag(s,whitespace)}
function charInString(c,s)
{for(i=0;i<s.length;i++)
{if(s.charAt(i)==c)return true;}
return false}
function stripInitialWhitespace(s)
{var i=0;while((i<s.length)&&charInString(s.charAt(i),whitespace))
i++;return s.substring(i,s.length);}
function isLetter(c)
{return(((c>="a")&&(c<="z"))||((c>="A")&&(c<="Z")))}
function isDigit(c)
{return((c>="0")&&(c<="9"))}
function isLetterOrDigit(c)
{return(isLetter(c)||isDigit(c))}
function isInteger(s)
{var i;if(isEmpty(s))
if(isInteger.arguments.length==1)return defaultEmptyOK;else return(isInteger.arguments[1]==true);for(i=0;i<s.length;i++)
{var c=s.charAt(i);if(!isDigit(c))return false;}
return true;}
function isSignedInteger(s)
{if(isEmpty(s))
if(isSignedInteger.arguments.length==1)return defaultEmptyOK;else return(isSignedInteger.arguments[1]==true);else{var startPos=0;var secondArg=defaultEmptyOK;if(isSignedInteger.arguments.length>1)
secondArg=isSignedInteger.arguments[1];if((s.charAt(0)=="-")||(s.charAt(0)=="+"))
startPos=1;return(isInteger(s.substring(startPos,s.length),secondArg))}}
function isPositiveInteger(s)
{var secondArg=defaultEmptyOK;if(isPositiveInteger.arguments.length>1)
secondArg=isPositiveInteger.arguments[1];return(isSignedInteger(s,secondArg)&&((isEmpty(s)&&secondArg)||(parseInt(s)>0)));}
function isNonnegativeInteger(s)
{var secondArg=defaultEmptyOK;if(isNonnegativeInteger.arguments.length>1)
secondArg=isNonnegativeInteger.arguments[1];return(isSignedInteger(s,secondArg)&&((isEmpty(s)&&secondArg)||(parseInt(s)>=0)));}
function isNegativeInteger(s)
{var secondArg=defaultEmptyOK;if(isNegativeInteger.arguments.length>1)
secondArg=isNegativeInteger.arguments[1];return(isSignedInteger(s,secondArg)&&((isEmpty(s)&&secondArg)||(parseInt(s)<0)));}
function isNonpositiveInteger(s)
{var secondArg=defaultEmptyOK;if(isNonpositiveInteger.arguments.length>1)
secondArg=isNonpositiveInteger.arguments[1];return(isSignedInteger(s,secondArg)&&((isEmpty(s)&&secondArg)||(parseInt(s)<=0)));}
function isFloat(s)
{var i;var seenDecimalPoint=false;if(isEmpty(s))
if(isFloat.arguments.length==1)return defaultEmptyOK;else return(isFloat.arguments[1]==true);if(s==decimalPointDelimiter)return false;for(i=0;i<s.length;i++)
{var c=s.charAt(i);if((c==decimalPointDelimiter)&&!seenDecimalPoint)seenDecimalPoint=true;else if(!isDigit(c))return false;}
return true;}
function isSignedFloat(s)
{if(isEmpty(s))
if(isSignedFloat.arguments.length==1)return defaultEmptyOK;else return(isSignedFloat.arguments[1]==true);else{var startPos=0;var secondArg=defaultEmptyOK;if(isSignedFloat.arguments.length>1)
secondArg=isSignedFloat.arguments[1];if((s.charAt(0)=="-")||(s.charAt(0)=="+"))
startPos=1;return(isFloat(s.substring(startPos,s.length),secondArg))}}
function isAlphabetic(s)
{var i;if(isEmpty(s))
if(isAlphabetic.arguments.length==1)return defaultEmptyOK;else return(isAlphabetic.arguments[1]==true);for(i=0;i<s.length;i++)
{var c=s.charAt(i);if(!isLetter(c))
return false;}
return true;}
function isAlphanumeric(s)
{var i;if(isEmpty(s))
if(isAlphanumeric.arguments.length==1)return defaultEmptyOK;else return(isAlphanumeric.arguments[1]==true);for(i=0;i<s.length;i++)
{var c=s.charAt(i);if(!(isLetter(c)||isDigit(c)))
{alert("You have Entered an invalid Charecter.  Please use only Letters and Numbers.");return false;}}
return true;}
function reformat(s)
{var arg;var sPos=0;var resultString="";for(var i=1;i<reformat.arguments.length;i++){arg=reformat.arguments[i];if(i%2==1)resultString+=arg;else{resultString+=s.substring(sPos,sPos+arg);sPos+=arg;}}
return resultString;}
function isSSN(s)
{if(isEmpty(s))
if(isSSN.arguments.length==1)return defaultEmptyOK;else return(isSSN.arguments[1]==true);return(isInteger(s)&&s.length==digitsInSocialSecurityNumber)}
function isUSPhoneNumber(s)
{if(isEmpty(s))
if(isUSPhoneNumber.arguments.length==1)return defaultEmptyOK;else return(isUSPhoneNumber.arguments[1]==true);return(isInteger(s)&&s.length==digitsInUSPhoneNumber)}
function isInternationalPhoneNumber(s)
{if(isEmpty(s))
if(isInternationalPhoneNumber.arguments.length==1)return defaultEmptyOK;else return(isInternationalPhoneNumber.arguments[1]==true);return(isPositiveInteger(s))}
function isZIPCode(s)
{if(isEmpty(s))
if(isZIPCode.arguments.length==1)return defaultEmptyOK;else return(isZIPCode.arguments[1]==true);return(isInteger(s)&&((s.length==digitsInZIPCode1)||(s.length==digitsInZIPCode2)))}
function isStateCode(s)
{if(isEmpty(s))
if(isStateCode.arguments.length==1)return defaultEmptyOK;else return(isStateCode.arguments[1]==true);return((USStateCodes.indexOf(s)!=-1)&&(s.indexOf(USStateCodeDelimiter)==-1))}
function isEmail(s)
{if(isEmpty(s))
if(isEmail.arguments.length==1)return defaultEmptyOK;else return(isEmail.arguments[1]==true);if(isWhitespace(s))return false;var i=1;var sLength=s.length;while((i<sLength)&&(s.charAt(i)!="@"))
{i++;}
if((i>=sLength)||(s.charAt(i)!="@"))return false;else i+=2;while((i<sLength)&&(s.charAt(i)!="."))
{i++}
if((i>=sLength-1)||(s.charAt(i)!="."))return false;if(ContainsInvalidEmailChars(s))return false;if(s.charAt(sLength-1)==".")return false;else return true;}
function isNotWhitespace(theField,s)
{var i;if(isEmpty(s))return true;for(i=0;i<s.length;i++)
{var c=s.charAt(i);if(whitespace.indexOf(c)==0)
{alert('You can not use spaces.');return false;}}
return true;}
function isYear(s)
{if(isEmpty(s))
if(isYear.arguments.length==1)return defaultEmptyOK;else return(isYear.arguments[1]==true);if(!isNonnegativeInteger(s))return false;return(s.length==4);}
function isIntegerInRange(s,a,b)
{if(isEmpty(s))
if(isIntegerInRange.arguments.length==1)return defaultEmptyOK;else return(isIntegerInRange.arguments[1]==true);if(!isInteger(s,false))return false;var num=parseInt(s);return((num>=a)&&(num<=b));}
function isMonth(s)
{if(isEmpty(s))
if(isMonth.arguments.length==1)return defaultEmptyOK;else return(isMonth.arguments[1]==true);return isIntegerInRange(s,1,12);}
function isDay(s)
{if(isEmpty(s))
if(isDay.arguments.length==1)return defaultEmptyOK;else return(isDay.arguments[1]==true);return isIntegerInRange(s,1,31);}
function daysInFebruary(year)
{return(((year%4==0)&&((!(year%100==0))||(year%400==0)))?29:28);}
function isDate(year,month,day)
{if(!(isYear(year,false)&&isMonth(month,false)&&isDay(day,false)))return false;var intYear=parseInt(year);var intMonth=parseInt(month);var intDay=parseInt(day);if(intDay>daysInMonth[intMonth])return false;if((intMonth==2)&&(intDay>daysInFebruary(intYear)))return false;return true;}
function prompt(s)
{window.status=s}
function promptEntry(s)
{window.status=pEntryPrompt+s}
function promptBlank()
{window.status=""}
function warnEmpty(theField,s)
{theField.focus()
alert(mPrefix+s+mSuffix)
return false}
function warnInvalid(theField,s)
{theField.focus()
theField.select()
alert(s)
return false}
function checkString(theField,s,emptyOK)
{if(checkString.arguments.length==2)emptyOK=defaultEmptyOK;if((emptyOK==true)&&(isEmpty(theField.value)))return true;if(isWhitespace(theField.value))
return warnEmpty(theField,s);else return true;}
function checkStateCode(theField,emptyOK)
{if(checkStateCode.arguments.length==1)emptyOK=defaultEmptyOK;if((emptyOK==true)&&(isEmpty(theField.value)))return true;else
{theField.value=theField.value.toUpperCase();if(!isStateCode(theField.value,false))
return warnInvalid(theField,iStateCode);else return true;}}
function reformatZIPCode(ZIPString)
{if(ZIPString.length==5)return ZIPString;else return(reformat(ZIPString,"",5,"-",4));}
function checkZIPCode(theField,emptyOK)
{if(checkZIPCode.arguments.length==1)emptyOK=defaultEmptyOK;if((emptyOK==true)&&(isEmpty(theField.value)))return true;else
{var normalizedZIP=stripCharsInBag(theField.value,ZIPCodeDelimiters)
if(!isZIPCode(normalizedZIP,false))
return warnInvalid(theField,iZIPCode);else
{theField.value=reformatZIPCode(normalizedZIP)
return true;}}}
function reformatUSPhone(USPhone)
{return(reformat(USPhone,"(",3,") ",3,"-",4))}
function checkUSPhone(theField,emptyOK)
{if(checkUSPhone.arguments.length==1)emptyOK=defaultEmptyOK;if((emptyOK==true)&&(isEmpty(theField.value)))return true;else
{var normalizedPhone=stripCharsInBag(theField.value,phoneNumberDelimiters)
if(!isUSPhoneNumber(normalizedPhone,false))
return warnInvalid(theField,iUSPhone);else
{theField.value=reformatUSPhone(normalizedPhone)
return true;}}}
function checkInternationalPhone(theField,emptyOK)
{if(checkInternationalPhone.arguments.length==1)emptyOK=defaultEmptyOK;if((emptyOK==true)&&(isEmpty(theField.value)))return true;else
{if(!isInternationalPhoneNumber(theField.value,false))
return warnInvalid(theField,iWorldPhone);else return true;}}
function checkEmail(theField,emptyOK)
{if(checkEmail.arguments.length==1)emptyOK=defaultEmptyOK;if((emptyOK==true)&&(isEmpty(theField.value)))return true;else if(!isEmail(theField.value,false))
return warnInvalid(theField,iEmail);else return true;}
function reformatSSN(SSN)
{return(reformat(SSN,"",3,"-",2,"-",4))}
function checkSSN(theField,emptyOK)
{if(checkSSN.arguments.length==1)emptyOK=defaultEmptyOK;if((emptyOK==true)&&(isEmpty(theField.value)))return true;else
{var normalizedSSN=stripCharsInBag(theField.value,SSNDelimiters)
if(!isSSN(normalizedSSN,false))
return warnInvalid(theField,iSSN);else
{theField.value=reformatSSN(normalizedSSN)
return true;}}}
function checkNumber(theField,emptyOK)
{if(checkNumber.arguments.length==1)
emptyOK=defaultEmptyOK;if((emptyOK==true)&&(isEmpty(theField.value)))
{return true;}
else
{if(!isInteger(theField.value,false))
{return warnInvalid(theField,iNumber);}
else
{return true;}}}
function checkYear(theField,emptyOK)
{if(checkYear.arguments.length==1)emptyOK=defaultEmptyOK;if((emptyOK==true)&&(isEmpty(theField.value)))return true;if(!isYear(theField.value,false))
return warnInvalid(theField,iYear);else return true;}
function checkMonth(theField,emptyOK)
{if(checkMonth.arguments.length==1)emptyOK=defaultEmptyOK;if((emptyOK==true)&&(isEmpty(theField.value)))return true;if(!isMonth(theField.value,false))
return warnInvalid(theField,iMonth);else return true;}
function checkDay(theField,emptyOK)
{if(checkDay.arguments.length==1)emptyOK=defaultEmptyOK;if((emptyOK==true)&&(isEmpty(theField.value)))return true;if(!isDay(theField.value,false))
return warnInvalid(theField,iDay);else return true;}
function checkDate(yearField,monthField,dayField,labelString,OKtoOmitDay)
{if(checkDate.arguments.length==4)OKtoOmitDay=false;if(!isYear(yearField.value))return warnInvalid(yearField,iYear);if(!isMonth(monthField.value))return warnInvalid(monthField,iMonth);if((OKtoOmitDay==true)&&isEmpty(dayField.value))return true;else if(!isDay(dayField.value))
return warnInvalid(dayField,iDay);if(isDate(yearField.value,monthField.value,dayField.value))
return true;alert(iDatePrefix+labelString+iDateSuffix)
return false}
function getRadioButtonValue(radio)
{for(var i=0;i<radio.length;i++)
{if(radio[i].checked){break}}
return radio[i].value}
function checkCreditCard(radio,theField)
{var cardType=getRadioButtonValue(radio)
var normalizedCCN=stripCharsInBag(theField.value,creditCardDelimiters)
if(!isCardMatch(cardType,normalizedCCN))
return warnInvalid(theField,iCreditCardPrefix+cardType+iCreditCardSuffix);else
{theField.value=normalizedCCN
return true}}
function isCreditCard(st){if(st.length>19)
return(false);sum=0;mul=1;l=st.length;for(i=0;i<l;i++){digit=st.substring(l-i-1,l-i);tproduct=parseInt(digit,10)*mul;if(tproduct>=10)
sum+=(tproduct%10)+1;else
sum+=tproduct;if(mul==1)
mul++;else
mul--;}
if((sum%10)==0)
return(true);else
return(false);}
function isVisa(cc)
{if(((cc.length==16)||(cc.length==13))&&(cc.substring(0,1)==4))
return isCreditCard(cc);return false;}
function isMasterCard(cc)
{firstdig=cc.substring(0,1);seconddig=cc.substring(1,2);if((cc.length==16)&&(firstdig==5)&&((seconddig>=1)&&(seconddig<=5)))
return isCreditCard(cc);return false;}
function isAmericanExpress(cc)
{firstdig=cc.substring(0,1);seconddig=cc.substring(1,2);if((cc.length==15)&&(firstdig==3)&&((seconddig==4)||(seconddig==7)))
return isCreditCard(cc);return false;}
function isDinersClub(cc)
{firstdig=cc.substring(0,1);seconddig=cc.substring(1,2);if((cc.length==14)&&(firstdig==3)&&((seconddig==0)||(seconddig==6)||(seconddig==8)))
return isCreditCard(cc);return false;}
function isCarteBlanche(cc)
{return isDinersClub(cc);}
function isDiscover(cc)
{first4digs=cc.substring(0,4);if((cc.length==16)&&(first4digs=="6011"))
return isCreditCard(cc);return false;}
function isEnRoute(cc)
{first4digs=cc.substring(0,4);if((cc.length==15)&&((first4digs=="2014")||(first4digs=="2149")))
return isCreditCard(cc);return false;}
function isJCB(cc)
{first4digs=cc.substring(0,4);if((cc.length==16)&&((first4digs=="3088")||(first4digs=="3096")||(first4digs=="3112")||(first4digs=="3158")||(first4digs=="3337")||(first4digs=="3528")))
return isCreditCard(cc);return false;}
function isAnyCard(cc)
{if(!isCreditCard(cc))
return false;if(!isMasterCard(cc)&&!isVisa(cc)&&!isAmericanExpress(cc)&&!isDinersClub(cc)&&!isDiscover(cc)&&!isEnRoute(cc)&&!isJCB(cc)){return false;}
return true;}
function isCardMatch(cardType,cardNumber)
{cardType=cardType.toUpperCase();var doesMatch=true;if((cardType=="VISA")&&(!isVisa(cardNumber)))
doesMatch=false;if((cardType=="MASTERCARD")&&(!isMasterCard(cardNumber)))
doesMatch=false;if(((cardType=="AMERICANEXPRESS")||(cardType=="AMEX"))&&(!isAmericanExpress(cardNumber)))doesMatch=false;if((cardType=="DISCOVER")&&(!isDiscover(cardNumber)))
doesMatch=false;if((cardType=="JCB")&&(!isJCB(cardNumber)))
doesMatch=false;if((cardType=="DINERS")&&(!isDinersClub(cardNumber)))
doesMatch=false;if((cardType=="CARTEBLANCHE")&&(!isCarteBlanche(cardNumber)))
doesMatch=false;if((cardType=="ENROUTE")&&(!isEnRoute(cardNumber)))
doesMatch=false;return doesMatch;}
function IsCC(st){return isCreditCard(st);}
function IsVisa(cc){return isVisa(cc);}
function IsVISA(cc){return isVisa(cc);}
function IsMasterCard(cc){return isMasterCard(cc);}
function IsMastercard(cc){return isMasterCard(cc);}
function IsMC(cc){return isMasterCard(cc);}
function IsAmericanExpress(cc){return isAmericanExpress(cc);}
function IsAmEx(cc){return isAmericanExpress(cc);}
function IsDinersClub(cc){return isDinersClub(cc);}
function IsDC(cc){return isDinersClub(cc);}
function IsDiners(cc){return isDinersClub(cc);}
function IsCarteBlanche(cc){return isCarteBlanche(cc);}
function IsCB(cc){return isCarteBlanche(cc);}
function IsDiscover(cc){return isDiscover(cc);}
function IsEnRoute(cc){return isEnRoute(cc);}
function IsenRoute(cc){return isEnRoute(cc);}
function IsJCB(cc){return isJCB(cc);}
function IsAnyCard(cc){return isAnyCard(cc);}
function IsCardMatch(cardType,cardNumber){return isCardMatch(cardType,cardNumber);}

function getDealers(){document.getElementById('directoryMembers').innerHTML='<base href="wsdirectory">';str=window.location;wsAjax.runRequest('wsdirectory/default.asp?showCount=9&contentOnly=true',searchHandler,false);}
var lastNodeAddedToMyArchive=null
function addToMyArchive(node){var retVal=true;if(node&&node.nodeName&&node.nodeName.toLowerCase()=='a'){lastNodeAddedToMyArchive=node;var href=node.href.replace(/&return=[^&]*/i,"");if(wsAjax.canRequest()){wsAjax.runRequest(href,addMyArchiveResponse);retVal=false;}}
return retVal;}
function addMyArchiveResponse(){updateMyArchive('add',lastNodeAddedToMyArchive);}
var responsePopupCounter=0;function updateMyArchive(requestType,node){ddmlCloseTopPopup();if(wsAjax.request.readyState==4){document.body.style.cursor='';var newContent,popupText;if(wsAjax.request.status==200){var target=document.getElementById('myArchive');var popupTarget;if(node==null)popupTarget=document.getElementById('usernameDisplayRegion');else popupTarget=node;if(target){var dummyList=document.createElement('ul');dummyList.innerHTML=wsAjax.request.responseText;var dummyItems=dummyList.getElementsByTagName('a');var currentItems=target.getElementsByTagName('a');if(requestType=='add'){if(dummyItems.length>0&&currentItems.length>0&&dummyItems[0].href.toLowerCase()==currentItems[0].href.toLowerCase()){popupText='Already saved';}else if(wsAjax.request.responseText.replace(/\s/g,'')!=''&&domChildren(dummyList).length>0){popupText='New story added';target.innerHTML=wsAjax.request.responseText;}else{popupText='Error archiving';}}else if(requestType=='delete'){if(dummyItems.length!=currentItems.length){popupText='Story Removed';target.innerHTML=wsAjax.request.responseText;}else{popupText='Error deleting from archive';}}}else{popupText='Story added';}
if(popupTarget){var popup=new ddmlPopup();popup.useBacking=false;popup.contents='<div class="myArchiveMessage">'+popupText+'</div>';popup.bShowToolbar=false;popup.target=new Array(popupTarget,'middle','top');popup.display();responsePopupCounter++
setTimeout('closeResponsePopup('+responsePopupCounter+')',2000);}}}}
function closeResponsePopup(id){if(responsePopupCounter==id)ddmlCloseTopPopup();}
var searchForm;function searchByValue(node){searchForm=node.parentNode;}
function removeFromMyArchive(node){return true;}
