
function openSS(theURL){windowHandle=window.open(theURL,'ss','toolbar=no,location=yes,status=no,menubar=no,scrollbars=no,resizable=no,width=740,height=565');if(!windowHandle){windowHandle.opener=self;}
windowHandle.focus();}
function goBackTo(theURL){if(self.opener){window.open(theURL);}
else{window.location.href=theURL;}}<!--
function openPopup(theURL,winName,features){windowHandle=window.open(theURL,winName,features);if(!windowHandle){windowHandle.opener=self;}
windowHandle.focus();}
var remote=null;function rs(n,u,w,h){remote=window.open(u,n,'width='+w+',height='+h+',resizable=yes,scrollbars=yes');if(remote!=null){if(remote.opener==null){remote.opener=self;}
window.name='piNewsRoot';remote.location.href=u;}
remote.focus();}
function openVideo(theURL){windowHandle=window.open(theURL,'video','toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=650,height=450');if(!windowHandle){windowHandle.opener=self;}
windowHandle.focus();}
var pv_evt,pv_head,pv_path,req,pv_x,pv_y,pv_ok=false,pv_async=true;function cancelPreview()
{try{pv_ok=false;tt_Hide();}
catch(ex){}}
function showPreview(event,headline,path)
{pv_evt=event;pv_head=headline;pv_path=path;pv_ok=true;try{pv_x=tt_EvX(event);pv_y=tt_EvY(event);if(!pv_async)
{tt_go(event,pv_head,req.responseText);}
else
{window.setTimeout('getOOTB()',700);}}
catch(ex){}}
function onPreviewLoaded()
{if(pv_async&&req.readyState==4&&req.status==200&&pv_ok)
{tt_go(pv_evt,pv_head,req.responseText,pv_x,pv_y);}}
function getOOTB()
{if(!pv_ok)
return true;path=pv_path;url="/v10/us/news/pages/homepage/ootb.php?u="+path;if(window.XMLHttpRequest){req=new XMLHttpRequest();req.onreadystatechange=onPreviewLoaded;req.open("GET",url,pv_async);req.send(null);}else if(window.ActiveXObject){req=new ActiveXObject("Microsoft.XMLHTTP");if(req){req.onreadystatechange=onPreviewLoaded;req.open("GET",url,pv_async);req.send();}}}
function yg_cookie(){var dc=document,a=[],c=[];if(dc.cookie.length>0){a=dc.cookie.split("; "),cl=a.length,ca=[];for(var i=cl-1;i>=0;i--){ca=a[i].split("=");c[ca[0]]=ca[1]}}
this.getAll=function(){return a}
this.get=function(n){return(c[n])?unescape(c[n]):0}
this.set=function(n,v,e,p,d,s){v=escape(v);var today=new Date(),nv=n+"="+v;var str=nv+((e)?"; expires="+e:"")+((p)?"; path="+p:"")+((d)?"; domain="+d:"")+((s)?"; secure":"");if((n.length>0&&v.length>0)&&(((e)&&(e>today))||(!e))&&(nv.length<4000)){dc.cookie=str;a[a.length]=nv;c[n]=v;return 1}else return 0;}
this.remove=function(n,p,d){if(c[n]){dc.cookie=n+"="+((p)?"; path="+p:"")+((d)?"; domain="+d:"")+"; expires=Thu, 01-Jan-1970 00:00:01 GMT";for(var i=a.length-1;i>=0;i--){if(a[i].indexOf(n)!=-1)a.splice(i,1)}c[n]=null;return 1;}else return 0;}}
var responsecont;var xmlhttpRequstObj;var selectLocalNewsLocation;var localNewsLocation;var localNewsTabs;var moreProvidersLinks;var moreProvidersClass;var moreProvidersDisplay;var moreLocalNewsProviders;var localNewsPageLink;function getnews()
{var now=new Date();var num=now.getTime();var url='/v10/us/news/modules/homepage/homepage_category.php?xmlhttp=1&rand='+num;if(window.XMLHttpRequest)
{xmlhttpRequstObj=new XMLHttpRequest();xmlhttpRequstObj.onreadystatechange=processRequestChange;xmlhttpRequstObj.open("GET",url,true);xmlhttpRequstObj.send(null);}
else if(window.ActiveXObject)
{xmlhttpRequstObj=new ActiveXObject("Microsoft.XMLHTTP");if(xmlhttpRequstObj)
{xmlhttpRequstObj.onreadystatechange=processRequestChange;xmlhttpRequstObj.open("GET",url,true);xmlhttpRequstObj.send();}}}
function processRequestChange()
{if(xmlhttpRequstObj.readyState==4)
{if(xmlhttpRequstObj.status==200)
{var newsstring=xmlhttpRequstObj.responseText;if(newsstring.length>200)
{shownews(newsstring);}}}}
function shownews(newsstring){responsecont=document.createElement('div');responsecont.innerHTML=newsstring;var mstrresponse=responsecont.innerHTML;var homecont=document.getElementById('tgglmstr');saveLocalNewsHtml();homecont.innerHTML=mstrresponse;restoreLocalNewsHtml();var homecontarr=homecont.getElementsByTagName('div');for(var i=0;i<homecontarr.length;i++){var classkey=homecontarr[i].getAttribute("title");if(classkey=="container-bin"){var idstring=homecontarr[i].id;linkthesetabs(idstring);}}
setUpLocationManagerForLocalNews();}
function makexmlo(){if(window.ActiveXObject){var xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");}else if(window.XMLHttpRequest){var xmlhttp=new XMLHttpRequest();}
return xmlhttp;}
function saveLocalNewsHtml(){var selectLocalNewsLocation=getElement("selectLocalNewsLocation");if(selectLocalNewsLocation!=null){selectLocalNewsLocationText=selectLocalNewsLocation.innerHTML;selectLocalNewsLocationStyleDisplay=selectLocalNewsLocation.style.display;}
changeLocationLink=getElement('ulmswitch');if(ulmswitch!=null){changeLocationStyleDisplay=changeLocationLink.style.display;}}
function restoreLocalNewsHtml(){var selectLocalNewsLocation=getElement("selectLocalNewsLocation");if(selectLocalNewsLocation!=null){selectLocalNewsLocation.innerHTML=selectLocalNewsLocationText;selectLocalNewsLocation.style.display=selectLocalNewsLocationStyleDisplay;}
var changeLocationLink=getElement('ulmswitch');if(changeLocationLink!=null){changeLocationLink.style.display=changeLocationStyleDisplay;}}
function getElement(id){var element=null;try{element=document.getElementById(id);}
catch(ex){element=document.all[id];}
return element;}
var dacookie=new yg_cookie();var expirestime=new Date()
expirestime.setTime(expirestime.getTime()+60*60*24*365*10000);var temptabcookie='u=0';var initYNEWSFRONT=dacookie.get("YNEWSFRONT");var initYNEWSMYSRC=dacookie.get("YNEWSMYSRC");var assarr=new Array();var mysrcarr=new Array();if(initYNEWSFRONT){var split1=initYNEWSFRONT.split('&');for(var subcookiekey in split1){var tempsplit=split1[subcookiekey].split('=');for(var namekey in tempsplit){if(namekey==0){var tempkey=String(tempsplit[0]);assarr[tempkey]=tempsplit[1];}}}}
if(initYNEWSMYSRC){var split1=initYNEWSMYSRC.split(',');for(var c in split1){mysrcarr[split1[c]]=1;}}else{var mysrcNewCookie=new Array;var countsrc=0;var mysrcString="";}
function toggleinit(){if(!dacookie.get("YNEWSFRONT")){dacookie.set("YNEWSFRONT",temptabcookie,expirestime);}
if(!dacookie.get("YNEWSMYSRC")){mysrcString=mysrcNewCookie.join(",");dacookie.set("YNEWSMYSRC",mysrcString,expirestime);}}
function linkthesetabs(catid){var wrapper=document.getElementById(catid);var child1=wrapper.firstChild;while(child1){if(child1.className=='newscat'){var child2=child1.firstChild;while(child2){if(child2.className=='toggle'){var liar=child2.getElementsByTagName('LI');var liarlen=liar.length;var mysrcnode=liarlen-1;for(var nodekey=0;nodekey<liarlen;nodekey++){liar[nodekey].firstChild.onclick=opensaysme;liar[nodekey].firstChild.catid=catid;liar[nodekey].firstChild.nodekey=nodekey;liar[nodekey].firstChild.mysrcnode=mysrcnode;}
var onkey;if(assarr[ieIsWeak(catid)]){onkey=assarr[ieIsWeak(catid)];}else{onkey=0;}
if(onkey>=0&&liarlen>=1)liar[0].className='';var prevkey=onkey-1;if(onkey>=0&&onkey<liarlen){liar[onkey].className='on';}
else if(liarlen==1){liar[0].className='on';}
if(prevkey>=0&&prevkey<liarlen-1){liar[prevkey].className='last';}
if(onkey!=mysrcnode)liar[mysrcnode].className='last';}
if(child2.className=='headlines'){var headlinear=child2.getElementsByTagName('DIV');if(onkey>0){var lastTabIndexWithHeadlines;if(catid=='c815'){lastTabIndexWithHeadlines=headlinear.length;}
else{lastTabIndexWithHeadlines=headlinear.length-1;}
for(var m=0;m<lastTabIndexWithHeadlines;m++){if(m==onkey){headlinear[m].className='showheadlines';}else{headlinear[m].className='moreheadlines';}}}
var mysrcobj=headlinear[mysrcnode];var mysrcheaders=new Array();if(mysrcobj){mysrcheaders=mysrcobj.getElementsByTagName('H4');}
for(var i=0;i<mysrcheaders.length;i++){var mysrcparent=mysrcheaders[i].parentNode;var mysrckey=mysrcparent.id;mysrcheaders[i].onclick=openmysrc;mysrcheaders[i].mysrckey=mysrckey;if(!dacookie.get("YNEWSMYSRC")){if(mysrcparent.className=="ynmysrcunit open"){mysrcNewCookie[countsrc++]=ieIsWeak(mysrckey);}}else{if(mysrcarr[ieIsWeak(mysrckey)]){mysrcparent.className="ynmysrcunit open";}else{mysrcparent.className="ynmysrcunit";}}}}
if(child2.className=='moreproviders'){if(onkey==mysrcnode){child2.style.display='none';}else{child2.style.display='block';}}
child2=child2.nextSibling;}}
child1=child1.nextSibling;}
if(!dacookie.get("YNEWSFRONT")){temptabcookie+='&'+ieIsWeak(catid)+'='+0;}}
function opensaysme(){var thiscookieID=this.catid;var onnodekey=this.nodekey;var mysrcnode=this.mysrcnode;var tempor=document.getElementById(thiscookieID);var n='YNEWSFRONT';var v='u=0';var e=expirestime;var p='';var d='';var s='';var YNEWSFRONT=dacookie.get("YNEWSFRONT");if(YNEWSFRONT){var split1=YNEWSFRONT.split('&');for(var subcookiekey in split1){var tempsplit=split1[subcookiekey].split('=');for(var namekey in tempsplit){if(namekey==0){if(tempsplit[0]!='u'){if(tempsplit[0]==ieIsWeak(thiscookieID)){v+='&'+tempsplit[0]+'='+onnodekey;}else{v+='&'+tempsplit[0]+'='+tempsplit[1];}}}}}}
dacookie.remove('YNEWSFRONT');dacookie.set(n,v,e,p,d,s);var wrapper=document.getElementById(thiscookieID);var child1=wrapper.firstChild;while(child1){if(child1.className=='newscat'){var child2=child1.firstChild;while(child2){if(child2.className=='toggle'){var liar=child2.getElementsByTagName('LI');var liarlen=liar.length;for(var nodekey=0;nodekey<liarlen;nodekey++){if((nodekey==3)&&(thiscookieID=='c815')){liar[nodekey].className='lolast';}else{liar[nodekey].className='';}}
var prevkey=onnodekey-1;liar[onnodekey].className='on';if(prevkey>-1)liar[prevkey].className='last';if(onnodekey!=mysrcnode)liar[mysrcnode].className='last';}
if(child2.className=='headlines'){var headlinear=child2.getElementsByTagName('DIV');for(z=0;z<headlinear.length;z++){if(headlinear[z].className=='showheadlines'){headlinear[z].className='moreheadlines';}}
headlinear[onnodekey].className='showheadlines';}
if(child2.className=='moreproviders'){if(onnodekey==mysrcnode){child2.style.display='none';}else{child2.style.display='block';}}
child2=child2.nextSibling;}}
child1=child1.nextSibling;}
return false;}
function openmysrc(){var mysrckey=this.mysrckey;var n='YNEWSMYSRC';var v='';var e=expirestime;var p='';var d='';var s='';var YNEWSMYSRC=dacookie.get("YNEWSMYSRC");var mysrcNewCookie=new Array;var mysrcOpen=new Array;if(YNEWSMYSRC){var valarr=YNEWSMYSRC.split(',');for(var themysrckey in valarr){if(valarr[themysrckey]!=""){mysrcNewCookie[themysrckey]=valarr[themysrckey];mysrcOpen[valarr[themysrckey]]=themysrckey;}}}
var dasrc=document.getElementById(mysrckey);if(mysrcOpen[ieIsWeak(mysrckey)]){var removekey=mysrcOpen[ieIsWeak(mysrckey)];var dumpfromarray=mysrcNewCookie.splice(removekey,1);}else{mysrcNewCookie.push(ieIsWeak(mysrckey));}
v=mysrcNewCookie.join(",");dacookie.remove('YNEWSMYSRC');dacookie.set(n,v,e,p,d,s);if(dasrc.className=='ynmysrcunit')dasrc.className='ynmysrcunit open';else dasrc.className='ynmysrcunit';return false;}
function ieIsWeak(anid){if(anid.indexOf("my")>-1){return anid.substr(2,anid.length);}else{return anid.substr(1,anid.length);}}
function loadingmsg(){var thiscookieID=this.catid;var block=thiscookieID.substring(1);var headlinekey="h"+block;var headlinecont=document.getElementById(headlinekey);var headarr=headlinecont.childNodes;for(var j=0;j<headarr.length;j++){if(headarr[j].className=='showheadlines'){var msg="Content loading..."
headarr[j].innerHTML=msg;}}
return false;}
function linktabstemp(catid){var wrapper=document.getElementById(catid);var child1=wrapper.firstChild;while(child1){if(child1.className=='newscat'){var child2=child1.firstChild;while(child2){if(child2.className=='toggle'){var liar=child2.getElementsByTagName('LI');var liarlen=liar.length;var mysrcnode=liarlen-1;for(var nodekey=0;nodekey<liarlen;nodekey++){liar[nodekey].firstChild.onclick=loadingmsg;liar[nodekey].firstChild.catid=catid;liar[nodekey].firstChild.nodekey=nodekey;liar[nodekey].firstChild.mysrcnode=mysrcnode;}}
child2=child2.nextSibling;}}
child1=child1.nextSibling;}}
function ygConnect(){}
ygConnect.prototype={_msxml_progid:['MSXML2.XMLHTTP.5.0','MSXML2.XMLHTTP.4.0','MSXML2.XMLHTTP.3.0','MSXML2.XMLHTTP','Microsoft.XMLHTTP'],_async_response:{},_http_header:[],_isFormPost:false,_sFormData:null,getConnObject:function(objectId,transactionId)
{var obj,http;try
{http=new XMLHttpRequest();obj={conn:http,oId:objectId,tId:transactionId};}
catch(e)
{for(var i=0;i<this._msxml_progid.length;++i){try
{http=new ActiveXObject(this._msxml_progid[i]);obj={conn:http,oId:objectId,tId:transactionId};}
catch(e){}}}
finally
{if(http!=undefined||obj!=undefined){var connObj=arguments.length>0?obj:http;return connObj;}
else{return null;}}},setProgId:function(id)
{this.msxml_progid.unshift(id);},syncRequest:function(o,sMethod,sUri,bXml,oPostData)
{if(!o){return;}
o.conn.open(sMethod,sUri,false);if(this._http_header.length>0)
this.setHeader(o.conn);if(this._isFormPost){oPostData=this._sFormData;this._isFormPost=false;}
oPostData?o.conn.send(oPostData):o.conn.send(null);try
{if(o.conn.status==200){response=(bXml?o.conn.responseXML:o.conn.responseText);}
else{response=this.connectException(o);}}
catch(e)
{response=this.connectException(e,o.tId);}
finally
{ygConnect.superclass.releaseObject(o);return response;}},asyncRequest:function(o,sMethod,sUri,bXml,oCallback,oCallbackArgs,oPostData)
{if(!o){var queueObject={method:sMethod,uri:sUri,isXml:bXml,callback:oCallback,argument:oCallbackArgs,data:oPostData}
ygConnect.superclass.queueRequest(queueObject);}
else{var self=this;o.conn.open(sMethod,sUri,true);if(oCallback){o.conn.onreadystatechange=function()
{if(o.conn.readyState==4){try
{if(o.conn.status==200){oCallback(o.conn,o.tId,oCallbackArgs);}
else{var errorObj=self.connectException(o);oCallback(errorObj,oCallbackArgs);}}
catch(e)
{var errorObj=self.connectException(e,o.tId);oCallback(errorObj,oCallbackArgs);}
finally
{ygConnect.superclass.releaseObject(o);}}}}
else{o.conn.onreadystatechange=function(){self.stateChange(o,bXml)}}
if(this._http_header.length>0){this.setHeader(o);}
if(this._isFormPost){oPostData=this._sFormData;this._isFormPost=false;}
oPostData?o.conn.send(oPostData):o.conn.send(null);}},stateChange:function(o,bXml)
{var oResponse;switch(o.conn.readyState){case 4:try
{if(o.conn.status==200){oResponse={tId:o.tId,status:o.conn.status,message:(bXml?o.conn.responseXML:o.conn.responseText)}}
else
oResponse=this.connectException(o);}
catch(e)
{oResponse=this.connectException(e,o.tId);}
finally
{this.setResponse(oResponse);ygConnect.superclass.releaseObject(o);}
break;}},setResponse:function(o)
{this._async_response[o.tId]=o;},getResponse:function(tId)
{var oResponse=this._async_response[tId];if(oResponse){delete this._async_response[tId];return oResponse;}},initHeader:function(label,value)
{var oHeader=[label,value];this._http_header.push(oHeader);},setHeader:function(o)
{var oHeader=this._http_header;for(var i=0;i<oHeader.length;i++)
o.conn.setRequestHeader(oHeader[i][0],oHeader[i][1]);oHeader.splice(0,oHeader.length);},getHeader:function(o,label)
{return o.conn.getResponseHeader(label);},getAllHeaders:function(o)
{return o.conn.getAllResponseHeaders();},setForm:function(formName)
{this._sFormData='';var prevElName;var oForm=document.forms[formName];for(var i=0;i<oForm.elements.length;i++){oElement=oForm.elements[i];elName=oForm.elements[i].name;elValue=oForm.elements[i].value;switch(oElement.type)
{case'select-multiple':for(var j=0;j<oElement.options.length;j++){if(oElement.options[j].selected)
this._sFormData+=elName+'='+encodeURIComponent(oElement.options[j].value)+'&';}
break;case'radio':if(oElement.checked)
this._sFormData+=elName+'='+encodeURIComponent(elValue)+'&';break;case'checkbox':if(oElement.checked){if(elName==prevElName){if(this._sFormData.lastIndexOf('&')==sFormData.length-1)
this._sFormData=this._sFormData.substr(0,this._sFormData.length-1);this._sFormData+=','+encodeURIComponent(elValue);}
else
this._sFormData+=elName+'='+encodeURIComponent(elValue)+'&';prevElName=elName;}
break;case'file':break;default:this._sFormData+=elName+'='+encodeURIComponent(elValue)+'&';break;}}
this._sFormData=this._sFormData.substr(0,this._sFormData.length-1);this._isFormPost=true;this.initHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');},abort:function(o)
{if(this.isCallInProgress(o)){o.conn.abort();ygConnect.superclass.releaseObject(o);}},isCallInProgress:function(o)
{if(o)
return o.conn.readyState!=4&&o.conn.readyState!=0;},connectException:function(o,transactionId)
{if(o.conn){return{tId:o.tId,status:o.conn.status,message:o.conn.statusText}}
else{return{tId:transactionId,status:o.name,message:o.message}}}}
var ygConnManager=function(){}
ygConnManager.prototype={_object_count:0,_available_pool:[],_request_queue:[],_enable_pool:true,_max_pool_size:2,_transaction_id:0,http:new ygConnect()}
var ygConn=ygConnManager.prototype;ygConnect.superclass=ygConnManager.prototype;ygConnManager.prototype.setPoolSize=function(i)
{this._max_pool_size=2;}
ygConnManager.prototype.disablePooling=function()
{this._enable_pool=false;}
ygConnManager.prototype.enablePooling=function()
{this._enable_pool=true;}
ygConnManager.prototype.getTransactionId=function()
{return this._transaction_id;}
ygConnManager.prototype.incrObjCount=function()
{this._object_count++;}
ygConnManager.prototype.incrTransactionId=function()
{this._transaction_id++;}
ygConnManager.prototype.getObject=function()
{var o;var oId;var tId=this.getTransactionId();try
{if(window.XMLHttpRequest){oId=this._object_count;o=this.http.getConnObject(oId,tId);if(o){this.incrTransactionId();}
return o;}
else if(window.ActiveXObject){return this.getActiveXObject();}}
catch(e)
{return this.getActiveXObject();}}
ygConnManager.prototype.getActiveXObject=function()
{var o;var oId;var tId=this.getTransactionId();if(this._object_count<this._max_pool_size&&this._available_pool.length==0){oId=this._object_count;o=this.http.getConnObject(oId,tId);if(o){this.incrObjCount();this.incrTransactionId();}}
else if(this._available_pool.length>0){o=this.getAvailableObject();if(o){o.tId=tId;this.incrTransactionId();}}
return o;}
ygConnManager.prototype.getAvailableObject=function()
{return this._available_pool.shift();}
ygConnManager.prototype.releaseObject=function(o)
{try
{if(window.XMLHttpRequest){o=null;}
else{o.conn.onreadystatechange=this.detachStateListener;o.conn.abort();this._available_pool.push(o);}}
catch(e)
{o.conn.onreadystatechange=this.detachStateListener;o.conn.abort();this._available_pool.push(o);}
finally
{this.checkRequestQueue();}}
ygConnManager.prototype.checkRequestQueue=function()
{if(this._request_queue.length>0){var o=this.getObject();var q=this._request_queue.shift();this.http.asyncRequest(o,q.method,q.uri,q.isXml,q.callback,q.argument,q.data);}}
ygConnManager.prototype.queueRequest=function(o)
{this._request_queue.push(o);}
ygConnManager.prototype.detachStateListener=function(){}
var ygPos=new function(){this.getPos=function(oEl){var pos=[oEl.offsetLeft,oEl.offsetTop];var parent=oEl.offsetParent;var tmp={x:null,y:null};if(parent!=oEl){while(parent){switch(browser){case'ie':if(_getStyle(parent,'position')=='relative'&&_getStyle(oEl,'width')=='auto'&&(_getStyle(oEl,'position')=='static'))
{return[oEl.offsetLeft,oEl.offsetTop];}
else if(_getStyle(parent,'width')!='auto'||_getStyle(oEl.parentNode,'position')!='static'){tmp.x=parseInt(_getStyle(parent,'borderLeftWidth'));tmp.y=parseInt(_getStyle(parent,'borderTopWidth'));if(!isNaN(tmp.x))pos[0]+=tmp.x;if(!isNaN(tmp.y))pos[1]+=tmp.y;}
break;case'gecko':if(_getStyle(parent,'position')=='relative'){tmp.x=parseInt(_getStyle(parent,'border-left-width'));tmp.y=parseInt(_getStyle(parent,'border-top-width'));if(!isNaN(tmp.x))pos[0]+=tmp.x;if(!isNaN(tmp.y))pos[1]+=tmp.y;}
break;}
pos[0]+=parent.offsetLeft;pos[1]+=parent.offsetTop;parent=parent.offsetParent;}}
if(browser=='ie'&&_getStyle(oEl,'width')!='auto'&&_getStyle(oEl.offsetParent,'width')=='auto'&&_getStyle(oEl.offsetParent,'position')=='relative'){parent=oEl.parentNode;while(parent.tagName!='HTML'){tmp.x=parseInt(_getStyle(parent,'marginLeft'));tmp.y=parseInt(_getStyle(parent,'paddingLeft'));if(!isNaN(tmp.x))pos[0]-=tmp.x;if(!isNaN(tmp.y))pos[0]-=tmp.y;parent=parent.parentNode;}}
return pos;};this.getX=function(oEl){return this.getPos(oEl)[0];};this.getY=function(oEl){return this.getPos(oEl)[1];};this.setPos=function(oEl,endPos){var offset=[0,0];var delta={x:0,y:0};var curStylePos=_getStyle(oEl,'position');if(curStylePos=='static'){oEl.style.position='relative';curStylePos='relative';}
if(oEl.offsetWidth){if(curStylePos=='relative'){offset=this.getPos(oEl);var tmp={x:_getStyle(oEl,'left'),y:_getStyle(oEl,'top')};delta.x=(tmp.x&&tmp.x.indexOf('px')!=-1)?parseInt(tmp.x):0;delta.y=(tmp.y&&tmp.y.indexOf('px')!=-1)?parseInt(tmp.y):0;}
else{offset=this.getPos(oEl.offsetParent);var tmp={x:_getStyle(oEl,'margin-left'),y:_getStyle(oEl,'margin-top')};delta.x=(tmp.x&&tmp.x.indexOf('px')!=-1)?0-parseInt(tmp.x):0;delta.y=(tmp.y&&tmp.y.indexOf('px')!=-1)?0-parseInt(tmp.y):0;}}
if(browser=='safari'){if(oEl.offsetParent&&oEl.offsetParent.tagName=='BODY'){if(_getStyle(oEl,'position')=='relative'){delta.x-=document.body.offsetLeft;delta.y-=document.body.offsetTop;}
else if(_getStyle(oEl,'position')=='absolute'||_getStyle(oEl,'position')=='fixed'){delta.x+=document.body.offsetLeft;delta.y+=document.body.offsetTop;}}}
if(endPos[0]!==null)oEl.style.left=endPos[0]-offset[0]+delta.x+'px';if(endPos[1]!==null)oEl.style.top=endPos[1]-offset[1]+delta.y+'px';};this.setX=function(oEl,x){this.setPos(oEl,[x,null]);};this.setY=function(oEl,y){this.setPos(oEl,[null,y]);};this.getRegion=function(oEl){return new yui.Region.getRegion(oEl);};var _getStyle=function(oEl,property){var dv=document.defaultView;if(oEl.style[property])return oEl.style[property];else if(oEl.currentStyle){if(property.indexOf('-')!=-1){property=property.split('-');property[1]=property[1].toUpperCase().charAt(0)+property[1].substr(1);property=property.join('');}
if(oEl.currentStyle[property])return oEl.currentStyle[property];}
else if(dv&&dv.getComputedStyle(oEl,'')&&dv.getComputedStyle(oEl,'').getPropertyValue(property)){return dv.getComputedStyle(oEl,'').getPropertyValue(property);}
return null;};var _getBrowser=function(){var ua=navigator.userAgent.toLowerCase();if(ua.indexOf('opera')!=-1)
return'opera';else if(ua.indexOf('msie')!=-1)
return'ie';else if(ua.indexOf('safari')!=-1)
return'safari';else if(ua.indexOf('gecko')!=-1)
return'gecko';else
return false;};var browser=_getBrowser();};yui=window.yui||{};yui.Region=function(t,r,b,l){this.top=t;this.right=r;this.bottom=b;this.left=l;};yui.Region.prototype.contains=function(region){return(region.left>=this.left&&region.right<=this.right&&region.top>=this.top&&region.bottom<=this.bottom);};yui.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};yui.Region.prototype.intersect=function(region){var t=Math.max(this.top,region.top);var r=Math.min(this.right,region.right);var b=Math.min(this.bottom,region.bottom);var l=Math.max(this.left,region.left);if(b>=t&&r>=l){return new yui.Region(t,r,b,l);}else{return null;}};yui.Region.prototype.union=function(region){var t=Math.min(this.top,region.top);var r=Math.max(this.right,region.right);var b=Math.max(this.bottom,region.bottom);var l=Math.min(this.left,region.left);return new yui.Region(t,r,b,l);};yui.Region.prototype.toString=function(){return("Region {"+"  t: "+this.top+", r: "+this.right+", b: "+this.bottom+", l: "+this.left+"}");}
yui.Region.getRegion=function(el){var p=ygPos.getPos(el);var t=p[1];var r=p[0]+el.offsetWidth;var b=p[1]+el.offsetHeight;var l=p[0];return new yui.Region(t,r,b,l);};yui.Point=function(x,y){this.x=x;this.y=y;this.top=y;this.right=x;this.bottom=y;this.left=x;};yui.Point.prototype=new yui.Region();var PI=window.PI||{};PI.namespace=function(_1){if(!_1||!_1.length){return null;}var _2=_1.split(".");var _3=PI;for(var i=(_2[0]=="PI")?1:0;i<_2.length;++i){_3[_2[i]]=_3[_2[i]]||{};_3=_3[_2[i]];}return _3;};PI.namespace("util");PI.namespace("widget");PI.namespace("example");PI.util.Dom=new function(){this.get=function(el){if(typeof el=='string'){el=document.getElementById(el);}return el;};this.getStyle=function(el,property){var value=null;var dv=document.defaultView;el=this.get(el);if(property=='opacity'&&el.filters){value=1;try{value=el.filters.item('DXImageTransform.Microsoft.Alpha').opacity/100;}catch(e){try{value=el.filters.item('alpha').opacity/100;}catch(e){}}}else if(el.style[property]){value=el.style[property];}else if(el.currentStyle&&el.currentStyle[property]){value=el.currentStyle[property];}else if(dv&&dv.getComputedStyle){var converted='';for(i=0,len=property.length;i<len;++i){if(property.charAt(i)==property.charAt(i).toUpperCase()){converted=converted+'-'+property.charAt(i).toLowerCase();}else{converted=converted+property.charAt(i);}}if(dv.getComputedStyle(el,'').getPropertyValue(converted)){value=dv.getComputedStyle(el,'').getPropertyValue(converted);}}return value;};this.setStyle=function(el,property,val){el=this.get(el);switch(property){case'opacity':if(el.filters){el.style.filter='alpha(opacity='+val*100+')';if(!el.currentStyle.hasLayout){el.style.zoom=1;}}else{el.style.opacity=val;el.style['-moz-opacity']=val;el.style['-khtml-opacity']=val;}break;default:el.style[property]=val;}};this.getXY=function(el){el=this.get(el);if(el.parentNode===null||this.getStyle(el,'display')=='none'){return false;}var parent=null;var pos=[];var box;if(el.getBoundingClientRect){box=el.getBoundingClientRect();var scrollTop=document.documentElement.scrollTop||document.body.scrollTop;var scrollLeft=document.documentElement.scrollLeft||document.body.scrollLeft;return[box.left+scrollLeft,box.top+scrollTop];}else if(document.getBoxObjectFor){box=document.getBoxObjectFor(el);pos=[box.x,box.y];}else{pos=[el.offsetLeft,el.offsetTop];parent=el.offsetParent;if(parent!=el){while(parent){pos[0]+=parent.offsetLeft;pos[1]+=parent.offsetTop;parent=parent.offsetParent;}}var ua=navigator.userAgent.toLowerCase();if(ua.indexOf('opera')!=-1||(ua.indexOf('safari')!=-1&&this.getStyle(el,'position')=='absolute')){pos[0]-=document.body.offsetLeft;pos[1]-=document.body.offsetTop;}}if(el.parentNode){parent=el.parentNode;}else{parent=null;}while(parent&&parent.tagName!='BODY'&&parent.tagName!='HTML'){pos[0]-=parent.scrollLeft;pos[1]-=parent.scrollTop;if(parent.parentNode){parent=parent.parentNode;}else{parent=null;}}return pos;};this.getX=function(el){return this.getXY(el)[0];};this.getY=function(el){return this.getXY(el)[1];};this.setXY=function(el,pos,noRetry){el=this.get(el);var pageXY=PI.util.Dom.getXY(el);if(pageXY===false){return false;}if(this.getStyle(el,'position')=='static'){this.setStyle(el,'position','relative');}var delta=[parseInt(PI.util.Dom.getStyle(el,'left'),10),parseInt(PI.util.Dom.getStyle(el,'top'),10)];if(isNaN(delta[0])){delta[0]=0;}if(isNaN(delta[1])){delta[1]=0;}if(pos[0]!==null){el.style.left=pos[0]-pageXY[0]+delta[0]+'px';}if(pos[1]!==null){el.style.top=pos[1]-pageXY[1]+delta[1]+'px';}var newXY=this.getXY(el);if(!noRetry&&(newXY[0]!=pos[0]||newXY[1]!=pos[1])){this.setXY(el,pos,true);}return true;};this.setX=function(el,x){return this.setXY(el,[x,null]);};this.setY=function(el,y){return this.setXY(el,[null,y]);};this.getRegion=function(el){el=this.get(el);return new PI.util.Region.getRegion(el);};this.getClientWidth=function(){return(document.documentElement.offsetWidth||document.body.offsetWidth);};this.getClientHeight=function(){return(self.innerHeight||document.documentElement.clientHeight||document.body.clientHeight);};this.getElementsByClassName=function(className,tag,root){root=root||document;tag=tag||'*';var nodes=[];var elements=root.getElementsByTagName(tag);var re=new RegExp('(^|\\s)'+className+'(\\s|$)');for(var i=0,len=elements.length;i<len;++i){if(re.test(elements[i]['className'])){nodes[nodes.length]=elements[i];}}return nodes;};this.hasClass=function(el,className){el=this.get(el);var re=new RegExp('(^|\\s)'+className+'(\\s|$)');return re.test(el['className']);};this.addClass=function(el,className){if(this.hasClass(el,className)){return false;}el=this.get(el);el['className']=[el['className'],className].join(' ');return true;};this.removeClass=function(el,className){if(!this.hasClass(el,className)){return false;}el=this.get(el);var re=new RegExp('(^|\\s)'+className+'(\\s|$)');var c=el['className'];el['className']=c.replace(re,'');return true;};};PI.util.Region=function(t,r,b,l){this.top=t;this.right=r;this.bottom=b;this.left=l;};PI.util.Region.prototype.contains=function(region){return(region.left>=this.left&&region.right<=this.right&&region.top>=this.top&&region.bottom<=this.bottom);};PI.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};PI.util.Region.prototype.intersect=function(region){var t=Math.max(this.top,region.top);var r=Math.min(this.right,region.right);var b=Math.min(this.bottom,region.bottom);var l=Math.max(this.left,region.left);if(b>=t&&r>=l){return new PI.util.Region(t,r,b,l);}else{return null;}};PI.util.Region.prototype.union=function(region){var t=Math.min(this.top,region.top);var r=Math.max(this.right,region.right);var b=Math.max(this.bottom,region.bottom);var l=Math.min(this.left,region.left);return new PI.util.Region(t,r,b,l);};PI.util.Region.prototype.toString=function(){return("Region {"+"  t: "+this.top+", r: "+this.right+", b: "+this.bottom+", l: "+this.left+"}");};PI.util.Region.getRegion=function(el){var p=PI.util.Dom.getXY(el);var t=p[1];var r=p[0]+el.offsetWidth;var b=p[1]+el.offsetHeight;var l=p[0];return new PI.util.Region(t,r,b,l);};PI.util.Point=function(x,y){this.x=x;this.y=y;this.top=y;this.right=x;this.bottom=y;this.left=x;};PI.util.Point.prototype=new PI.util.Region();PI.util.CustomEvent=function(_1,_2){this.type=_1;this.scope=_2||window;this.subscribers=[];if(PI.util["Event"]){PI.util.Event.regCE(this);}};PI.util.CustomEvent.prototype={subscribe:function(fn,_4,_5){this.subscribers.push(new PI.util.Subscriber(fn,_4,_5));},unsubscribe:function(fn,_6){var _7=false;for(var i=0;i<this.subscribers.length;++i){var s=this.subscribers[i];if(s&&s.contains(fn,_6)){this._delete(i);_7=true;}}return _7;},fire:function(){for(var i=0;i<this.subscribers.length;++i){var s=this.subscribers[i];if(s){var _10=(s.override)?s.obj:this.scope;s.fn.call(_10,this.type,arguments,s.obj);}}},unsubscribeAll:function(){for(var i=0;i<this.subscribers.length;++i){this._delete(i);}},_delete:function(_11){var s=this.subscribers[_11];if(s){delete s.fn;delete s.obj;}delete this.subscribers[_11];}};PI.util.Subscriber=function(fn,obj,_13){this.fn=fn;this.obj=obj||null;this.override=(_13);};PI.util.Subscriber.prototype.contains=function(fn,obj){return(this.fn==fn&&this.obj==obj);};if(!PI.util.Event){PI.util.Event=function(){var _14=false;var _15=[];var _16=[];var _17=[];var _18=[];var _19=[];var _20=[];var _21=0;var _22=[];return{POLL_RETRYS:200,POLL_INTERVAL:50,EL:0,TYPE:1,FN:2,WFN:3,SCOPE:3,ADJ_SCOPE:4,isSafari:(/Safari|Konqueror|KHTML/gi).test(navigator.userAgent),isIE:(!this.isSafari&&!navigator.userAgent.match(/opera/gi)&&navigator.userAgent.match(/msie/gi)),addDelayedListener:function(el,_24,fn,_25,_26){_16[_16.length]=[el,_24,fn,_25,_26];if(_14){_21=this.POLL_RETRYS;this.startTimeout(0);}},startTimeout:function(_27){var i=(_27||_27===0)?_27:this.POLL_INTERVAL;this.timeout=setTimeout("PI.util.Event._tryPreloadAttach()",i);},onAvailable:function(_28,_29,_30,_31){_22.push({id:_28,fn:_29,obj:_30,override:_31});_21=this.POLL_RETRYS;this.startTimeout(0);},addListener:function(el,_32,fn,_33,_34){if(this._isValidCollection(el)){var ok=true;for(var i=0;i<el.length;++i){ok=(this.on(el[i],_32,fn,_33,_34)&&ok);}return ok;}else{if(typeof el=="string"){var oEl=this.getEl(el);if(_14&&oEl){el=oEl;}else{this.addDelayedListener(el,_32,fn,_33,_34);return true;}}}if(!el){return false;}if("unload"==_32&&_33!==this){_17[_17.length]=[el,_32,fn,_33,_34];return true;}var _37=(_34)?_33:el;var _38=function(e){return fn.call(_37,PI.util.Event.getEvent(e),_33);};var li=[el,_32,fn,_38,_37];var _41=_15.length;_15[_41]=li;if(this.useLegacyEvent(el,_32)){var _42=this.getLegacyIndex(el,_32);if(_42==-1){_42=_19.length;_19[_42]=[el,_32,el["on"+_32]];_20[_42]=[];el["on"+_32]=function(e){PI.util.Event.fireLegacyEvent(PI.util.Event.getEvent(e),_42);};}_20[_42].push(_41);}else{if(el.addEventListener){el.addEventListener(_32,_38,false);}else{if(el.attachEvent){el.attachEvent("on"+_32,_38);}}}return true;},fireLegacyEvent:function(e,_43){var ok=true;var le=_20[_43];for(i=0;i<le.length;++i){var _45=le[i];if(_45){var li=_15[_45];if(li&&li[this.WFN]){var _46=li[this.ADJ_SCOPE];var ret=li[this.WFN].call(_46,e);ok=(ok&&ret);}else{delete le[i];}}}return ok;},getLegacyIndex:function(el,_48){for(var i=0;i<_19.length;++i){var le=_19[i];if(le&&le[0]==el&&le[1]==_48){return i;}}return-1;},useLegacyEvent:function(el,_49){return((!el.addEventListener&&!el.attachEvent)||(_49=="click"&&this.isSafari));},removeListener:function(el,_50,fn){if(typeof el=="string"){el=this.getEl(el);}else{if(this._isValidCollection(el)){var ok=true;for(var i=0;i<el.length;++i){ok=(this.removeListener(el[i],_50,fn)&&ok);}return ok;}}var _51=null;var _52=this._getCacheIndex(el,_50,fn);if(_52>=0){_51=_15[_52];}if(!el||!_51){return false;}if(el.removeEventListener){el.removeEventListener(_50,_51[this.WFN],false);}else{if(el.detachEvent){el.detachEvent("on"+_50,_51[this.WFN]);}}delete _15[_52][this.WFN];delete _15[_52][this.FN];delete _15[_52];return true;},getTarget:function(ev,_54){var t=ev.target||ev.srcElement;if(_54&&t&&"#text"==t.nodeName){return t.parentNode;}else{return t;}},getPageX:function(ev){var x=ev.pageX;if(!x&&0!==x){x=ev.clientX||0;if(this.isIE){x+=this._getScrollLeft();}}return x;},getPageY:function(ev){var y=ev.pageY;if(!y&&0!==y){y=ev.clientY||0;if(this.isIE){y+=this._getScrollTop();}}return y;},getXY:function(ev){return[this.getPageX(ev),this.getPageY(ev)];},getRelatedTarget:function(ev){var t=ev.relatedTarget;if(!t){if(ev.type=="mouseout"){t=ev.toElement;}else{if(ev.type=="mouseover"){t=ev.fromElement;}}}return t;},getTime:function(ev){if(!ev.time){var t=new Date().getTime();try{ev.time=t;}catch(e){return t;}}return ev.time;},stopEvent:function(ev){this.stopPropagation(ev);this.preventDefault(ev);},stopPropagation:function(ev){if(ev.stopPropagation){ev.stopPropagation();}else{ev.cancelBubble=true;}},preventDefault:function(ev){if(ev.preventDefault){ev.preventDefault();}else{ev.returnValue=false;}},getEvent:function(e){var ev=e||window.event;if(!ev){var c=this.getEvent.caller;while(c){ev=c.arguments[0];if(ev&&Event==ev.constructor){break;}c=c.caller;}}return ev;},getCharCode:function(ev){return ev.charCode||(ev.type=="keypress")?ev.keyCode:0;},_getCacheIndex:function(el,_59,fn){for(var i=0;i<_15.length;++i){var li=_15[i];if(li&&li[this.FN]==fn&&li[this.EL]==el&&li[this.TYPE]==_59){return i;}}return-1;},_isValidCollection:function(o){return(o&&o.length&&typeof o!="string"&&!o.tagName&&!o.alert&&typeof o[0]!="undefined");},elCache:{},getEl:function(id){return document.getElementById(id);},clearCache:function(){for(i in this.elCache){delete this.elCache[i];}},regCE:function(ce){_18.push(ce);},_load:function(e){_14=true;},_tryPreloadAttach:function(){if(this.locked){return false;}this.locked=true;var _63=!_14;if(!_63){_63=(_21>0);}var _64=[];for(var i=0;i<_16.length;++i){var d=_16[i];if(d){var el=this.getEl(d[this.EL]);if(el){this.on(el,d[this.TYPE],d[this.FN],d[this.SCOPE],d[this.ADJ_SCOPE]);delete _16[i];}else{_64.push(d);}}}_16=_64;notAvail=[];for(i=0;i<_22.length;++i){var _66=_22[i];if(_66){el=this.getEl(_66.id);if(el){var _67=(_66.override)?_66.obj:el;_66.fn.call(_67,_66.obj);delete _22[i];}else{notAvail.push(_66);}}}_21=(_64.length===0&&notAvail.length===0)?0:_21-1;if(_63){this.startTimeout();}this.locked=false;},_unload:function(e,me){for(var i=0;i<_17.length;++i){var l=_17[i];if(l){var _70=(l[this.ADJ_SCOPE])?l[this.SCOPE]:window;l[this.FN].call(_70,this.getEvent(e),l[this.SCOPE]);}}if(_15&&_15.length>0){for(i=0;i<_15.length;++i){l=_15[i];if(l){this.removeListener(l[this.EL],l[this.TYPE],l[this.FN]);}}this.clearCache();}for(i=0;i<_18.length;++i){_18[i].unsubscribeAll();delete _18[i];}for(i=0;i<_19.length;++i){delete _19[i][0];delete _19[i];}},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var dd=document.documentElement;db=document.body;if(dd&&dd.scrollTop){return[dd.scrollTop,dd.scrollLeft];}else{if(db){return[db.scrollTop,db.scrollLeft];}else{return[0,0];}}}};}();PI.util.Event.on=PI.util.Event.addListener;if(document&&document.body){PI.util.Event._load();}else{PI.util.Event.on(window,"load",PI.util.Event._load,PI.util.Event,true);}PI.util.Event.on(window,"unload",PI.util.Event._unload,PI.util.Event,true);PI.util.Event._tryPreloadAttach();}
PI.util.Anim=function(el,attributes,duration,method){if(el){this.init(el,attributes,duration,method);}};PI.util.Anim.prototype={doMethod:function(attribute,start,end){return this.method(this.currentFrame,start,end-start,this.totalFrames);},setAttribute:function(attribute,val,unit){PI.util.Dom.setStyle(this.getEl(),attribute,val+unit);},getAttribute:function(attribute){return parseFloat(PI.util.Dom.getStyle(this.getEl(),attribute));},defaultUnit:'px',defaultUnits:{opacity:' '},init:function(el,attributes,duration,method){var isAnimated=false;var startTime=null;var endTime=null;var actualFrames=0;var defaultValues={};el=PI.util.Dom.get(el);this.attributes=attributes||{};this.duration=duration||1;this.method=method||PI.util.Easing.easeNone;this.useSeconds=true;this.currentFrame=0;this.totalFrames=PI.util.AnimMgr.fps;this.getEl=function(){return el;};this.setDefault=function(attribute,val){if(val.constructor!=Array&&(val=='auto'||isNaN(val))){switch(attribute){case'width':val=el.clientWidth||el.offsetWidth;break;case'height':val=el.clientHeight||el.offsetHeight;break;case'left':if(PI.util.Dom.getStyle(el,'position')=='absolute'){val=el.offsetLeft;}else{val=0;}break;case'top':if(PI.util.Dom.getStyle(el,'position')=='absolute'){val=el.offsetTop;}else{val=0;}break;default:val=0;}}defaultValues[attribute]=val;};this.getDefault=function(attribute){return defaultValues[attribute];};this.isAnimated=function(){return isAnimated;};this.getStartTime=function(){return startTime;};this.animate=function(){if(this.isAnimated()){return false;}this.onStart.fire();this._onStart.fire();this.totalFrames=(this.useSeconds)?Math.ceil(PI.util.AnimMgr.fps*this.duration):this.duration;PI.util.AnimMgr.registerElement(this);var attributes=this.attributes;var el=this.getEl();var val;for(var attribute in attributes){val=this.getAttribute(attribute);this.setDefault(attribute,val);}isAnimated=true;actualFrames=0;startTime=new Date();};this.stop=function(){if(!this.isAnimated()){return false;}this.currentFrame=0;endTime=new Date();var data={time:endTime,duration:endTime-startTime,frames:actualFrames,fps:actualFrames/this.duration};isAnimated=false;actualFrames=0;this.onComplete.fire(data);};var onTween=function(){var start;var end=null;var val;var unit;var attributes=this['attributes'];for(var attribute in attributes){unit=attributes[attribute]['unit']||this.defaultUnits[attribute]||this.defaultUnit;if(typeof attributes[attribute]['from']!='undefined'){start=attributes[attribute]['from'];}else{start=this.getDefault(attribute);}if(typeof attributes[attribute]['to']!='undefined'){end=attributes[attribute]['to'];}else if(typeof attributes[attribute]['by']!='undefined'){if(start.constructor==Array){end=[];for(var i=0,len=start.length;i<len;++i){end[i]=start[i]+attributes[attribute]['by'][i];}}else{end=start+attributes[attribute]['by'];}}if(end!==null&&typeof end!='undefined'){val=this.doMethod(attribute,start,end);if((attribute=='width'||attribute=='height'||attribute=='opacity')&&val<0){val=0;}this.setAttribute(attribute,val,unit);}}actualFrames+=1;};this._onStart=new PI.util.CustomEvent('_onStart',this);this.onStart=new PI.util.CustomEvent('start',this);this.onTween=new PI.util.CustomEvent('tween',this);this._onTween=new PI.util.CustomEvent('_tween',this);this.onComplete=new PI.util.CustomEvent('complete',this);this._onTween.subscribe(onTween);}};PI.util.AnimMgr=new function(){var thread=null;var queue=[];var tweenCount=0;this.fps=200;this.delay=1;this.registerElement=function(tween){if(tween.isAnimated()){return false;}queue[queue.length]=tween;tweenCount+=1;this.start();};this.start=function(){if(thread===null){thread=setInterval(this.run,this.delay);}};this.stop=function(tween){if(!tween){clearInterval(thread);for(var i=0,len=queue.length;i<len;++i){if(queue[i].isAnimated()){queue[i].stop();}}queue=[];thread=null;tweenCount=0;}else{tween.stop();tweenCount-=1;if(tweenCount<=0){this.stop();}}};this.run=function(){for(var i=0,len=queue.length;i<len;++i){var tween=queue[i];if(!tween||!tween.isAnimated()){continue;}if(tween.currentFrame<tween.totalFrames||tween.totalFrames===null){tween.currentFrame+=1;if(tween.useSeconds){correctFrame(tween);}tween.onTween.fire();tween._onTween.fire();}else{PI.util.AnimMgr.stop(tween);}}};var correctFrame=function(tween){var frames=tween.totalFrames;var frame=tween.currentFrame;var expected=(tween.currentFrame*tween.duration*1000/tween.totalFrames);var elapsed=(new Date()-tween.getStartTime());var tweak=0;if(elapsed<tween.duration*1000){tweak=Math.round((elapsed/expected-1)*tween.currentFrame);}else{tweak=frames-(frame+1);}if(tweak>0&&isFinite(tweak)){if(tween.currentFrame+tweak>=frames){tweak=frames-(frame+1);}tween.currentFrame+=tweak;}};};PI.util.Bezier=new function(){this.getPosition=function(points,t){var n=points.length;var tmp=[];for(var i=0;i<n;++i){tmp[i]=[points[i][0],points[i][1]];}for(var j=1;j<n;++j){for(i=0;i<n-j;++i){tmp[i][0]=(1-t)*tmp[i][0]+t*tmp[parseInt(i+1,10)][0];tmp[i][1]=(1-t)*tmp[i][1]+t*tmp[parseInt(i+1,10)][1];}}return[tmp[0][0],tmp[0][1]];};};PI.util.Easing=new function(){this.easeNone=function(t,b,c,d){return b+c*(t/=d);};this.easeIn=function(t,b,c,d){return b+c*((t/=d)*t*t);};this.easeOut=function(t,b,c,d){var ts=(t/=d)*t;var tc=ts*t;return b+c*(tc+-3*ts+3*t);};this.easeBoth=function(t,b,c,d){var ts=(t/=d)*t;var tc=ts*t;return b+c*(-2*tc+3*ts);};this.backIn=function(t,b,c,d){var ts=(t/=d)*t;var tc=ts*t;return b+c*(-3.4005*tc*ts+10.2*ts*ts+-6.2*tc+0.4*ts);};this.backOut=function(t,b,c,d){var ts=(t/=d)*t;var tc=ts*t;return b+c*(8.292*tc*ts+-21.88*ts*ts+22.08*tc+-12.69*ts+5.1975*t);};this.backBoth=function(t,b,c,d){var ts=(t/=d)*t;var tc=ts*t;return b+c*(0.402*tc*ts+-2.1525*ts*ts+-3.2*tc+8*ts+-2.05*t);};};PI.util.Motion=function(el,attributes,duration,method){if(el){this.initMotion(el,attributes,duration,method);}};PI.util.Motion.prototype=new PI.util.Anim();PI.util.Motion.prototype.defaultUnits.points='px';PI.util.Motion.prototype.doMethod=function(attribute,start,end){var val=null;if(attribute=='points'){var translatedPoints=this.getTranslatedPoints();var t=this.method(this.currentFrame,0,100,this.totalFrames)/100;if(translatedPoints){val=PI.util.Bezier.getPosition(translatedPoints,t);}}else{val=this.method(this.currentFrame,start,end-start,this.totalFrames);}return val;};PI.util.Motion.prototype.getAttribute=function(attribute){var val=null;if(attribute=='points'){val=[this.getAttribute('left'),this.getAttribute('top')];if(isNaN(val[0])){val[0]=0;}if(isNaN(val[1])){val[1]=0;}}else{val=parseFloat(PI.util.Dom.getStyle(this.getEl(),attribute));}return val;};PI.util.Motion.prototype.setAttribute=function(attribute,val,unit){if(attribute=='points'){PI.util.Dom.setStyle(this.getEl(),'left',val[0]+unit);PI.util.Dom.setStyle(this.getEl(),'top',val[1]+unit);}else{PI.util.Dom.setStyle(this.getEl(),attribute,val+unit);}};PI.util.Motion.prototype.initMotion=function(el,attributes,duration,method){PI.util.Anim.call(this,el,attributes,duration,method);attributes=attributes||{};attributes.points=attributes.points||{};attributes.points.control=attributes.points.control||[];this.attributes=attributes;var start;var end=null;var translatedPoints=null;this.getTranslatedPoints=function(){return translatedPoints;};var translateValues=function(val,self){var pageXY=PI.util.Dom.getXY(self.getEl());val=[val[0]-pageXY[0]+start[0],val[1]-pageXY[1]+start[1]];return val;};var onStart=function(){start=this.getAttribute('points');var attributes=this.attributes;var control=attributes['points']['control']||[];if(control.length>0&&control[0].constructor!=Array){control=[control];}if(PI.util.Dom.getStyle(this.getEl(),'position')=='static'){PI.util.Dom.setStyle(this.getEl(),'position','relative');}if(typeof attributes['points']['from']!='undefined'){PI.util.Dom.setXY(this.getEl(),attributes['points']['from']);start=this.getAttribute('points');}else if((start[0]===0||start[1]===0)){PI.util.Dom.setXY(this.getEl(),PI.util.Dom.getXY(this.getEl()));start=this.getAttribute('points');}var i,len;if(typeof attributes['points']['to']!='undefined'){end=translateValues(attributes['points']['to'],this);for(i=0,len=control.length;i<len;++i){control[i]=translateValues(control[i],this);}}else if(typeof attributes['points']['by']!='undefined'){end=[start[0]+attributes['points']['by'][0],start[1]+attributes['points']['by'][1]];for(i=0,len=control.length;i<len;++i){control[i]=[start[0]+control[i][0],start[1]+control[i][1]];}}if(end){translatedPoints=[start];if(control.length>0){translatedPoints=translatedPoints.concat(control);}translatedPoints[translatedPoints.length]=end;}};this._onStart.subscribe(onStart);};PI.util.Scroll=function(el,attributes,duration,method){if(el){PI.util.Anim.call(this,el,attributes,duration,method);}};PI.util.Scroll.prototype=new PI.util.Anim();PI.util.Scroll.prototype.defaultUnits.scroll=' ';PI.util.Scroll.prototype.doMethod=function(attribute,start,end){var val=null;if(attribute=='scroll'){val=[this.method(this.currentFrame,start[0],end[0]-start[0],this.totalFrames),this.method(this.currentFrame,start[1],end[1]-start[1],this.totalFrames)];}else{val=this.method(this.currentFrame,start,end-start,this.totalFrames);}return val;};PI.util.Scroll.prototype.getAttribute=function(attribute){var val=null;var el=this.getEl();if(attribute=='scroll'){val=[el.scrollLeft,el.scrollTop];}else{val=parseFloat(PI.util.Dom.getStyle(el,attribute));}return val;};PI.util.Scroll.prototype.setAttribute=function(attribute,val,unit){var el=this.getEl();if(attribute=='scroll'){el.scrollLeft=val[0];el.scrollTop=val[1];}else{PI.util.Dom.setStyle(el,attribute,val+unit);}};PI.namespace('News');PI.News.Reload=function(){setInterval("location.reload(false)",600000)};PI.util.Event.addListener(window,'load',PI.News.Reload);yui=window.yui||{};yui.CustomEvent=function(_1,_2){this.type=_1;this.scope=_2||window;this.subscribers=[];if(yui["Event"]){yui.Event.regCE(this);}};yui.CustomEvent.prototype.subscribe=function(fn,_4){this.subscribers.push(new yui.Subscriber(fn,_4));};yui.CustomEvent.prototype.unsubscribe=function(fn,_5){for(var i=0;i<this.subscribers.length;++i){var s=this.subscribers[i];if(s&&s.contains(fn,_5)){this._delete(i);}}};yui.CustomEvent.prototype.fire=function(){for(var i=0;i<this.subscribers.length;++i){var s=this.subscribers[i];if(s){s.fn.call(this.scope,this.type,arguments,s.obj);}}};yui.CustomEvent.prototype.unsubscribeAll=function(){for(var i=0;i<this.subscribers.length;++i){this._delete(i);}};yui.CustomEvent.prototype._delete=function(_8){var s=this.subscribers[_8];if(s){delete s.fn;delete s.obj;}delete this.subscribers[_8];};yui.Subscriber=function(fn,_9){this.fn=fn;this.obj=_9||null;};yui.Subscriber.prototype.contains=function(fn,obj){return(this.fn==fn&&this.obj==obj);};yui=window.yui||{};yui.Event=new function(){var _11=this;this.loadComplete=false;this.listeners=[];this.delayedListeners=[];this.unloadListeners=[];this.customEvents=[];this.legacyEvents=[];this.legacyHandlers=[];this.EL=0;this.TYPE=1;this.FN=2;this.WFN=3;this.SCOPE=3;this.isSafari=(navigator.userAgent.match(/safari/gi));this.isIE=(!this.isSafari&&navigator.userAgent.match(/msie/gi));this.addListener=function(el,_13,fn,_14){if(this._isValidCollection(el)){for(var i=0;i<el.length;++i){this.on(el[i],_13,fn,_14);}return;}else{if(typeof el=="string"){if(this.loadComplete){el=this.getEl(el);}else{this.delayedListeners[this.delayedListeners.length]=[el,_13,fn,_14];return;}}}if(!el){return;}if("unload"==_13&&_14!==this){this.unloadListeners[this.unloadListeners.length]=[el,_13,fn,_14];return;}var _15=function(e){return fn.call(el,_11.getEvent(e),_14);};var li=[el,_13,fn,_15];var _18=this.listeners.length;this.listeners[_18]=li;if(this.useLegacyEvent(el,_13)){var _19=this.getLegacyIndex(el,_13);if(_19==-1){_19=this.legacyEvents.length;this.legacyEvents[_19]=[el,_13,el["on"+_13]];this.legacyHandlers[_19]=[];el["on"+_13]=function(e){_11.fireLegacyEvent(_11.getEvent(e),_19);};}this.legacyHandlers[_19].push(_18);}else{if(el.addEventListener){el.addEventListener(_13,_15,false);}else{if(el.attachEvent){el.attachEvent("on"+_13,_15);}}}};this.on=this.addListener;this.fireLegacyEvent=function(e,_20){var ok=true;var el=_11.legacyEvents[0];var le=_11.legacyHandlers[_20];for(i=0;i<le.length;++i){var _23=le[i];if(_23){var ret=_11.listeners[_23][_11.WFN].call(el,e);ok=(ok&&ret);}}return ok;};this.getLegacyIndex=function(el,_25){for(var i=0;i<this.legacyEvents.length;++i){var le=this.legacyEvents[i];if(le&&le[0]==el&&le[1]==_25){return i;}}return-1;};this.useLegacyEvent=function(el,_26){return((!el.addEventListener&&!el.attachEvent)||(_26=="click"&&this.isSafari));};this.removeListener=function(el,_27,fn){if(typeof el=="string"){el=this.getEl(el);}else{if(this._isValidCollection(el)){for(var i=0;i<el.length;++i){this.removeListener(el[i],_27,fn);}return;}}var _28=null;var _29=this._getCacheIndex(el,_27,fn);if(_29>=0){_28=this.listeners[_29];}if(!el||!_28){return false;}if(el.removeEventListener){el.removeEventListener(_27,_28[this.WFN],false);}else{if(el.detachEvent){el.detachEvent("on"+_27,_28[this.WFN]);}}delete this.listeners[_29][this.WFN];delete this.listeners[_29][this.FN];delete this.listeners[_29];return true;};this.getTarget=function(ev,_31){var t=ev.target||ev.srcElement;if(_31&&t&&"#text"==t.nodeName){return t.parentNode;}else{return t;}};this.getPageX=function(ev){var x=ev.pageX;if(!x&&0!==x){x=ev.clientX||0;if(this.isIE){x+=this._getScrollLeft();}}return x;};this.getPageY=function(ev){var y=ev.pageY;if(!y&&0!==y){y=ev.clientY||0;if(this.isIE){y+=this._getScrollTop();}}return y;};this.getRelatedTarget=function(ev){var t=ev.relatedTarget;if(!t){if(ev.type=="mouseout"){t=ev.toElement;}else{if(ev.type=="mouseover"){t=ev.fromElement;}}}return t;};this.getTime=function(ev){if(!ev.time){var t=new Date().getTime();try{ev.time=t;}catch(e){return t;}}return ev.time;};this.stopEvent=function(ev){this.stopPropagation(ev);this.preventDefault(ev);};this.stopPropagation=function(ev){if(ev.stopPropagation){ev.stopPropagation();}else{ev.cancelBubble=true;}};this.preventDefault=function(ev){if(ev.preventDefault){ev.preventDefault();}else{ev.returnValue=false;}};this.getEvent=function(e){var ev=e||window.event;if(!ev){var c=this.getEvent.caller;while(c){ev=c.arguments[0];if(ev&&Event==ev.constructor){break;}c=c.caller;}}return ev;};this.getCharCode=function(ev){return ev.charCode||(ev.type=="keypress")?ev.keyCode:0;};this._getCacheIndex=function(el,_36,fn){for(var i=0;i<this.listeners.length;++i){var li=this.listeners[i];if(li&&li[this.FN]==fn&&li[this.EL]==el&&li[this.TYPE]==_36){return i;}}return-1;};this._isValidCollection=function(o){return(o&&o.length&&typeof o!="string"&&!o.alert&&!o.name&&!o.id&&typeof o[0]!="undefined");};this.elCache={};this.getEl=function(id){return document.getElementById(id);};this.clearCache=function(){for(i in this.elCache){delete this.elCache[i];}};this.regCE=function(ce){this.customEvents.push(ce);};this._load=function(e){_11.loadComplete=true;};this._tryPreloadAttach=function(){var _40=!this.loadComplete;for(var i=0;i<this.delayedListeners.length;++i){var d=this.delayedListeners[i];if(d){var el=this.getEl(d[this.EL]);if(el){this.on(el,d[this.TYPE],d[this.FN],d[this.SCOPE]);delete this.delayedListeners[i];}}}if(_40){setTimeout("yui.Event._tryPreloadAttach()",50);}};this._unload=function(e,me){for(var i=0;i<me.unloadListeners.length;++i){var l=me.unloadListeners[i];if(l){l[me.FN](me.getEvent(e),l[me.SCOPE]);}}if(me.listeners&&me.listeners.length>0){for(i=0;i<me.listeners.length;++i){l=me.listeners[i];if(l){me.removeListener(l[me.EL],l[me.TYPE],l[me.FN]);}}me.clearCache();}for(i=0;i<me.customEvents.length;++i){me.customEvents[i].unsubscribeAll();delete me.customEvents[i];}for(i=0;i<me.legacyEvents.length;++i){delete me.legacyEvents[i][0];delete me.legacyEvents[i];}};this._getScrollLeft=function(){return this._getScroll()[1];};this._getScrollTop=function(){return this._getScroll()[0];};this._getScroll=function(){var dd=document.documentElement;db=document.body;if(dd&&dd.scrollTop){return[dd.scrollTop,dd.scrollLeft];}else{if(db){return[db.scrollTop,db.scrollLeft];}else{return[0,0];}}};};if(document&&document.body){yui.Event._load();}else{yui.Event.on(window,"load",yui.Event._load,yui.Event);}yui.Event.on(window,"unload",yui.Event._unload,yui.Event);yui.Event._tryPreloadAttach();PI.namespace('News');PI.News.Scroller=function(args){args=args||{};this.viewableArea=document.getElementById(args.viewableArea)||'scrollviewable';this.scrollerContainer=args.scrollerContainer||'scroll';this.indicatorContainer=args.indicatorContainer||'indcont';this.scrollButtonContainer=args.scrollButtonContainer||'scrollButtonContainer';this.delayTime=args.delayTime||10000;this.currentPane=0;this.autoScroll=null;this.autoScrollOn=true;this.sclBtnLft="sclBtnLft";this.sclBtnRgt="sclBtnRgt";this.sclBtnClassOff="buttonOff";this.sclBtnClassOn="buttonOn";this.indicatorClassOff="off";this.indicatorClassOn="on";this.w=this.viewableArea.offsetWidth;this.viewableArea.scrollLeft='0px';var gettabs=document.getElementById(this.scrollerContainer);var getdiv=gettabs.getElementsByTagName("div");var countPanes=0;var dl=getdiv.length;for(var x=0;x<dl;x++){var classkey=getdiv[x].getAttribute("title");if((x===0)&&(classkey=="container-bin")){var getFirst=getdiv[x];}
if(classkey=="container-bin"){var idstring=getdiv[x].id;countPanes++;}}
this.maxpanes=countPanes-1;this.max_width=this.w*this.maxpanes;var duplicate=getFirst.cloneNode(true);duplicate.removeAttribute("id");duplicate.setAttribute("name","duplicate");document.getElementById(this.scrollerContainer).appendChild(duplicate);document.write('<div class="dline_vert"></div>');document.write('<div id="'+this.scrollButtonContainer+'">');document.write('<div class="fscleft">');document.write('<a href="/" class="'+this.sclBtnClassOff+'"><strong>Left Arrow</strong></a>');document.write('</div>');document.write('<div class="fscright">');if(this.maxpanes>0){document.write('<a href="/" class="'+this.sclBtnClassOn+'"><strong>Right Arrow</strong></a>');}else if(this.maxpanes==0){document.write('<a href="/" class="'+this.sclBtnClassOff+'"><strong>Right Arrow</strong></a>');}
document.write('</div>');document.write('</div>');document.write('<div id="'+this.indicatorContainer+'" class="dots">');for(x=0;x<=this.maxpanes;x++){if(x==0){document.write('<a href="/" id="'+this.indicatorContainer+x+'" class="'+this.indicatorClassOn+'"><strong>Pane '+x+'</strong>&nbsp;</a>');}else{document.write('<a href="/" id="'+this.indicatorContainer+x+'" class="'+this.indicatorClassOff+'"><strong>Pane '+x+'</strong>&nbsp;</a>');}}
document.write('</div>');PI.util.Event.onAvailable(this.scrollerContainer,this.init,this,true);};PI.News.Scroller.prototype={init:function(){var getContainer=document.getElementById(this.scrollButtonContainer);var getanchor=getContainer.getElementsByTagName("a");var al=getanchor.length;for(var x=0;x<al;x++){if(x==0){var getLeft=getanchor[x];PI.util.Event.addListener(getLeft,'click',this.prev,this,true);}else if(x==1){var getRight=getanchor[x];PI.util.Event.addListener(getRight,'click',this.next,this,true);}}
var getcont=document.getElementById(this.indicatorContainer);var getAnchor=getcont.getElementsByTagName('a');var il=getAnchor.length;for(var n=0;n<il;n++){getAnchor[n].cp=n;PI.util.Event.addListener(getAnchor[n],'click',this.indicators,this,true);}
if(this.maxpanes!=0){this.autoStart();}},indicators:function(e){if(this.maxpanes!=0){this.stopInterval();this.currentPane=PI.util.Event.getTarget(e).cp;this.scrollToPane(this.currentPane);}
PI.util.Event.preventDefault(e);},prev:function(e){if(this.currentPane<0){this.currentPane=0;PI.util.Event.preventDefault(e);return;}
this.stopInterval();this.currentPane--;this.scrollToPane(this.currentPane);PI.util.Event.preventDefault(e);},next:function(e){if(this.currentPane==this.maxpanes){this.currentPane=this.maxpanes;PI.util.Event.preventDefault(e);return;}
this.stopInterval();this.currentPane++;this.scrollToPane(this.currentPane);PI.util.Event.preventDefault(e);},changeStates:function(currentPane){if(currentPane==0){this.changeButtons('f');}else{this.changeButtons('m');}
if(currentPane>0){this.changeButtons('m');}
if(currentPane==this.maxpanes){this.changeButtons('l');}
var count=0;while(count<=this.maxpanes){var a=this.indicatorContainer+count;var setIndiOff=document.getElementById(a);setIndiOff.className=this.indicatorClassOff;setIndiOff.setAttribute("class",this.indicatorClassOff);count++;}
if(currentPane>this.maxpanes){currentPane=0;this.currentPane=0;this.changeButtons('f');}
var temp=this.indicatorContainer+currentPane;var setIndiOn=document.getElementById(temp);setIndiOn.className=this.indicatorClassOn;setIndiOn.setAttribute("class",this.indicatorClassOn);},changeButtons:function(m){switch(m){case"f":this.bgPos(this.sclBtnLft,"off");this.bgPos(this.sclBtnRgt,"on");break;case"m":this.bgPos(this.sclBtnLft,"on");this.bgPos(this.sclBtnRgt,"on");break;case"l":this.bgPos(this.sclBtnLft,"on");this.bgPos(this.sclBtnRgt,"off");break;default:this.bgPos(this.sclBtnLft,"off");this.bgPos(this.sclBtnRgt,"on");}},bgPos:function(classNm,state){var getContainer=document.getElementById(this.scrollButtonContainer);var getanchor=getContainer.getElementsByTagName("a");if(classNm==this.sclBtnLft){var button=getanchor[0];}else if(classNm==this.sclBtnRgt){var button=getanchor[1];}
if(state=="off"){button.className=this.sclBtnClassOff+" "+this.classNm;button.setAttribute("class",this.sclBtnClassOff+" "+this.classNm);}else if(state=="on"){button.className=this.sclBtnClassOn+" "+classNm;button.setAttribute("class",this.sclBtnClassOn+" "+this.classNm);}},scrollToPane:function(currentPane){if(currentPane==-1){return;}
this.currentPane=currentPane;this.animate(currentPane);this.changeStates(currentPane);},animate:function(currentPane){var move=currentPane*this.w;var attributes={scroll:{to:[move,0]}};var anim=new PI.util.Scroll(this.viewableArea,attributes,0.5,PI.util.Easing.easeOut);if((this.autoScrollOn===true)&&(currentPane>this.maxpanes)){anim.onComplete.subscribe(this.setToZero);this.stopInterval();this.currentPane=0;this.changeStates(this.currentPane);}
anim.animate();return false;},setToZero:function(){var el=this.getEl();el.scrollLeft=0;},autoStart:function(){if(this.autoScrollOn){var doit=function(self){return function(){self.scrollToPane(self.currentPane+1);self.autoStart();}}
clearTimeout(this.autoScroll);this.autoScroll=setTimeout(doit(this),this.delayTime);}},stopInterval:function(){if(this.autoScrollOn===true){clearTimeout(this.autoScroll);this.autoScrollOn=false;}}};if(oYULM==undefined){var oYULM;}
if(yulmParams==undefined){var yulmParams=new Array();}
if(oRPC==undefined){var oRPC=ygConn.getObject();}
function yulm()
{var trackingbeacon=document.createElement('img');trackingbeacon.id='beacon';trackingbeacon.width=1;trackingbeacon.height=1;trackingbeacon.setAttribute('src',ULMBEACONURL);document.body.appendChild(trackingbeacon);this.id='';this.showform=0;this.isopen=0;this.listclick=0;tmp=document.createElement('div');tmp.setAttribute('id','yulm');tmp.innerHTML='<h4>Loading...</h4>';document.body.appendChild(tmp);function yulmCloser(e)
{if(oYULM.isopen==0)return;if(!e)var e=window.event;if(e.target)targ=e.target;else if(e.srcElement)targ=e.srcElement;if(targ.nodeType==3)targ=targ.parentNode;if(targ.id==oYULM.trigger)return;var n=targ;do{if(n.nodeName=="DIV")
{if(n.id&&n.id=="yulm")
{return;}}
n=n.parentNode;}
while(n!=null&&n.nodeName!="HTML")
oYULM.isopen=0;oYULM.hide();}
yui.Event.addListener(document,"mousedown",yulmCloser,oYULM);}
yulm.prototype.hide=function()
{document.getElementById('yulm').style.display='none';}
yulm.prototype.show=function()
{document.getElementById('yulm').style.display='block';if(typeof(yguc)!="undefined"&&yguc.bindChildElements)yguc.bindChildElements(document.getElementById('yulm'));}
yulm.prototype.visible=function(){document.getElementById('yulm').style.visibility='visible';oYULM.isvisible=1;}
yulm.prototype.hidden=function(){document.getElementById('yulm').style.visibility='hidden';oYULM.isvisible=0;}
yulm.prototype.getData=function(url)
{var div=document.getElementById('yulm');div.innerHTML='<div id="yulminner"><h4>Retrieving Location Data...</h4></div>';var fN=function callback()
{var raw=arguments[0].responseText;var reg=new RegExp('<!--.+-->','g');var data=raw.replace(reg,"");div.innerHTML=data;var fNClear=function()
{url=this.href;divRecent=document.getElementById('yulmrecent');divRecent.innerHTML='<h4>clearing...</h4>';ygConn.http.asyncRequest(oRPC,'GET',url,false,function(){divRecent.innerHTML='';},null,null);document.getElementById(oYULM.ftxtid).value='';document.getElementById(oYULM.fdefaultid).checked=true;pi_ulm_trackClearRecentLocationClick(oYULM.spaceid,oYULM.locationtype,'beacon');}
yui.Event.addListener(oYULM.ftxtid,'keyup',function(){pi_ulm_trackEditLocationBoxWhenDefault(oYULM.spaceid,oYULM.locationtype,'beacon');},oYULM);yui.Event.addListener(oYULM.fdefaultid,'mousedown',function(){ulm_track_checkbox(this,oYULM.locationtype);},oYULM);yui.Event.addListener('yulmclear','mousedown',fNClear,oYULM);yui.Event.addListener('yulmsavedsignin','mousedown',function(){pi_ulm_trackSavedLocationSignInClick(oYULM.spaceid,oYULM,locationtype,'beacon');},oYULM);yui.Event.addListener('yulmsave','mousedown',function(){pi_ulm_trackEditSavedLocationClick(oYULM.spaceid,oYULM.locationtype,'beacon');},oYULM);yui.Event.addListener('yulmwhat','mousedown',function(){pi_ulm_trackWhatsThisClick(oYULM.spaceid,oYULM.locationtype,'beacon');},oYULM);if(oYULM.showform==1)
{yulmCheckIsDefault(oYULM.anchor);yui.Event.addListener(oYULM.ftxtid,'keyup',function(){yulmCheckIsDefault(oYULM.anchor);});}};ygConn.http.asyncRequest(oRPC,'GET',url,false,fN,null,null);}
yulm.prototype.setPos=function(x,y)
{tEl=document.getElementById(this.id);tPos=ygPos.getPos(tEl);tH=tEl.offsetHeight;tW=tEl.offsetWidth;tX=tPos[0];tY=tPos[1];ulmEl=document.getElementById('yulm');ulmElW=ulmEl.offsetWidth;newulmX=(tX+x-(ulmElW-tW));if(newulmX<10)newulmX=10;ygPos.setX(ulmEl,newulmX);ygPos.setY(ulmEl,tY+tH+y);}
function yulmToggle(el,t,e,sh)
{if(!oYULM)
{oYULM=new yulm();}
var params=yulmParams[t];oYULM.trigger=el.id;oYULM.spaceid=params['spaceid'];oYULM.anchor=params['anchor'];oYULM.showform=params['showform'];oYULM.locationtype=params['locationtype'];oYULM.form=params['form'];oYULM.faction=params['faction'];oYULM.fmethod=params['fmethod'];oYULM.ftxtid=params['ftxtid'];oYULM.ftxtval=params['ftxtval'];oYULM.fdefaultid=params['fdefaultid'];oYULM.fsubmitid=params['fsubmitid'];oYULM.fsubmitlabel=params['fsubmitlabel'];oYULM.dataurl=params['dataurl'];oYULM.listclick='';if(oYULM.isopen==0||t!=oYULM.id)
{var url=oYULM.dataurl
+'tid='+t
+'&s='+oYULM.showform
+'&l='+oYULM.locationtype
+'&f='+oYULM.form
+'&fa='+oYULM.faction
+'&fm='+oYULM.fmethod
+'&ft='+oYULM.ftxtid
+'&ftv='+oYULM.ftxtval
+'&fd='+oYULM.fdefaultid
+'&fs='+oYULM.fsubmitid
+'&fsl='+oYULM.fsubmitlabel
+'&r='+Math.random();oYULM.getData(url);oYULM.id=t;oYULM.show();if(sh){oYULM.isopen=1;oYULM.visible();}else{oYULM.isopen=0;oYULM.hidden();}
oYULM.setPos(params['adjustX'],params['adjustY']);}
else if(sh)
{oYULM.isopen=0;oYULM.hide();}
return false;}
function yulmSubmit(el,tid,e)
{if(!oYULM){return false;};var params=yulmParams[tid];var l=params['locationtype'];var ft=document.getElementById(params['ftxtid']).value;if(ft=='')return;var ftval=(ft!='')?ft:'none';var fd=document.getElementById(params['fdefaultid']);var fdckd=(fd.checked)?1:0;var s=params['showform'];var qs='l='+l
+'&tid='+tid
+'&ftv='+ftval
+'&s='+s
+'&lc='+oYULM.listclick
+'&fdckd='+fdckd;if(oYULM.unqid)
{qs+='&unqid='+oYULM.unqid;}
qs+='&r='+Math.random();var url=params['validateurl']+qs;oYULM.unqid=null;var fN=function callBack()
{var raw=arguments[0].responseText;var reg=new RegExp('<!--.+-->','g');var data=raw.replace(reg,'');eval("var err = "+data);if(err['type']==1||err['type']==2)
{params['ftxtval']=ftval;if(fdckd)params['ftxtdefault']=ftval;if(!params['fonsubmit']&&err['type']==1)
{oFORM=document.getElementById(params['form']);oFORM.submit();}
else
{if(oYULM.isopen==1&&oYULM.showform===1){oYULM.isopen=0;oYULM.hide();}
if(err['type']==1){args={l:l,ft:ft,ftval:ftval,fd:fd,fdckd:fdckd};yulmAltSubmit(params['fonsubmit'],args);}else if(err['type']==2){yulmAltSubmit(params['fonsubmit'],err['args']);}}
switch(oYULM.listclick)
{case'R':pi_ulm_trackSetLocationFromRecent(oYULM.spaceid,oYULM.locationtype,'beacon');break;case'S':pi_ulm_trackSetLocationFromSaved(oYULM.spaceid,oYULM.locationtype,'beacon');break;}}
else
{error_message={type:err['type'],msg:err['msg'],keyword:ftval};yulmAppendError(error_message);}};ygConn.http.asyncRequest(oRPC,'GET',url,false,fN,null,null);}
function yulmAppendError(err)
{if(oYULM.isopen==0)oYULM.show();if(oYULM.isvisible==0)oYULM.visible();switch(err['type'])
{case-1:errTxt='Your search produced no matches';errSub='Please re-enter a City &amp; State, or U.S. ZIP code';pi_ulm_trackInvalidLocation(oYULM.spaceid,oYULM.locationtype,'beacon');break;case-2:errTxt='Your search for "'+err['keyword']+'" produced multiple matches';errSub='Please select your preferred location below:';pi_ulm_trackAmbiguousLocation(oYULM.spaceid,oYULM.locationtype,'beacon');break;}
var oERR=document.getElementById('yulmerror');oERR.innerHTML='';oERR.innerHTML='<h5>'+errTxt+'</h5>'
+'<h6>'+errSub+'</h6>'
+err['msg'];oYULM.isopen=1;}
function yulmClearError()
{if(document.getElementById('yulmerror')){var oERR=document.getElementById('yulmerror');oERR.innerHTML='';}}
function yulmAltSubmit(o,args){o(args);}
function yulmFillLoc(l,tid,lt,s,d,i,unqid)
{if(unqid)
{oYULM.unqid=unqid;}
var params=yulmParams[oYULM.id];var isdefault=s;var s=params["showform"];var fdefault=document.getElementById(oYULM.fdefaultid);oYULM.listclick=lt;oYULM.intl=i;document.getElementById(oYULM.ftxtid).value=l;switch(lt)
{case'R':pi_ulm_trackRecentLocationClick(oYULM.spaceid,oYULM.locationtype,'beacon');break;case'S':pi_ulm_trackSavedLocationClick(oYULM.spaceid,oYULM.locationtype,'beacon');break}
pi_ulm_trackGetLocation(oYULM.spaceid,oYULM.locationtype,'beacon',lt);yulmCheckIsDefault(params['anchor']);if(!s)
{oYULM.isopen=0;oYULM.hide();}}
function yulmCheckIsDefault(anchor,e){var params=yulmParams[anchor];var theform=params['form'];var txtfield=document.getElementById(params['ftxtid']);var ckbx=document.getElementById(params['fdefaultid']);var defaultloc=params['ftxtdisplay'];var hasdefaultloc=params['ftxtdisplayisdefault'];ckbx.checked=(txtfield.value==''||(hasdefaultloc==1&&(txtfield.value.toLowerCase()==defaultloc.toLowerCase())))?true:false;if(hasdefaultloc&&ckbx.checked==false)
{pi_ulm_trackEditLocationBoxWhenDefault(oYULM.spaceid,oYULM.locationtype,'beacon');}
if(e&&e.type=='keyup'&&((e.which&&e.which==13)||(e.keyCode&&e.keyCode==13)))
{yulmSubmit(this,anchor,e);}}
function yulmAttachUlm(t)
{yulmGetStyles();yulmParams[t['anchor']]=t;var tr=t['triggers'];var trlen=tr.length;for(i=0;i<trlen;i++)
{if(tr[i][2]==1){yui.Event.addListener(tr[i][0],tr[i][1],function(){yulmToggle(this,t['anchor'],999,1);});yui.Event.addListener(tr[i][0],'mousedown',function(){pi_ulm_trackDropdownClick(t['spaceid'],t['locationtype'],'beacon');});}else{yui.Event.addListener(tr[i][0],tr[i][1],function(){yulmToggle(this,t['anchor'],999,0);});yui.Event.addListener(tr[i][0],'mousedown',function(){pi_ulm_trackDropdownClick(t['spaceid'],t['locationtype'],'beacon');});}}
if(t['showform']==0)
{yui.Event.addListener(t['fdefaultid'],'click',function(){ulm_track_checkbox(this,t['locationtype']);});yui.Event.addListener(t['ftxtid'],'keyup',function(e){yulmCheckIsDefault(t['anchor'],e);});}
if(t['fsubmitid']!=''&&t['showform']==0&&t['validateurl']!='')
{yui.Event.addListener(t['fsubmitid'],'click',function(e){yulmSubmit(this,t['anchor'],e);});}}
function yulmGetStyles(){if(!document.getElementById('ulm_styles')){var ulm_styles=document.createElement('link');ulm_styles.id='ulm_styles';ulm_styles.setAttribute('rel','stylesheet');ulm_styles.setAttribute('type','text/css');ulm_styles.setAttribute('href',ULMCSSURL);document.getElementsByTagName('head')[0].appendChild(ulm_styles);}}
ulm_track_default=-1;ulm_track_type=-1;function ulm_track_checkbox(o,tloc)
{if(o.checked)
{ulm_track_default=1;o.checked=true;pi_ulm_trackDefaultCheckboxOn(oYULM.spaceid,tloc,"beacon");}
else
{ulm_track_default=0;o.checked=false;pi_ulm_trackDefaultCheckboxOff(oYULM.spaceid,tloc,"beacon");}}
function ulm_track_setLocation(type,tloc)
{switch(tloc)
{case'local':thecheckbox=d.sf1.ulmdefault;break;case'weather':thecheckbox=d.w.we;break;}
if(ulm_track_default==1)
{pi_ulm_trackSetDefaultLocation(oYULM.spaceid,tloc,"beacon");}
else
{pi_ulm_trackSetLocationAsNotDefault(oYULM.spaceid,tloc,"beacon");}
switch(type)
{case'recentloc':pi_ulm_trackSetLocationFromRecent(oYULM.spaceid,tloc,"beacon");break;case'savedloc':pi_ulm_trackSetLocationFromSaved(oYULM.spaceid,tloc,"beacon");break;}}
var PI_ULT_LIBCODE=2;var CTRL_C='\x03';var CTRL_D='\x04';var PI_LRD_BEACON='http://us.lrd.pi.com/t/b.gif';var PI_BASE64_STR="ABCDEFGHIJKLMNOP"+"QRSTUVWXYZabcdef"+"ghijklmnopqrstuv"+"wxyz0123456789._-";function pi_linktrack_click(u,p){if(u&&p){}else{return u;}
p['_r']=PI_ULT_LIBCODE;var ks=[];var i=0;for(var k in p){var v=p[k];if(typeof(v)=='undefined'){v=p[k]='';}
if(k.length<1){return u;}
if(k.length>8){return u;}
if(k.indexOf(' ')!=-1){return u;}
if(pi_has_ctrl_char(k)||pi_has_ctrl_char(v)){return u;}
ks[i++]=k;}
ks=ks.sort();var f=[];for(var i=0;i<ks.length;i++){f[i]=ks[i]+CTRL_C+p[ks[i]];}
f=f.join(CTRL_D);if(f.length<1||f.length>1024){return u;}
f=';_ylc='+pi_encode64(f);var i=u.indexOf('/*');if(i==-1){i=u.indexOf('/?');}
if(i==-1){i=u.indexOf('?');}
if(i==-1){return u+f;}else{return u.substr(0,i)+f+u.substr(i);}}
function pi_linktrack_beacon(i,p){if(i&&p){var url=pi_linktrack_click(PI_LRD_BEACON,p);url+='?.rand='+Math.random();i.src=url;}}
function pi_has_ctrl_char(s){for(i=0;i<s.length;i++){if(s.charCodeAt(i)<0x20){return true;}}
return false;}
function pi_encode64(input){var output="";var chr1,chr2,chr3="";var enc1,enc2,enc3,enc4="";var i=0;do{chr1=input.charCodeAt(i++);chr2=input.charCodeAt(i++);chr3=input.charCodeAt(i++);enc1=chr1>>2;enc2=((chr1&3)<<4)|(chr2>>4);enc3=((chr2&15)<<2)|(chr3>>6);enc4=chr3&63;if(isNaN(chr2)){enc3=enc4=64;}else if(isNaN(chr3)){enc4=64;}
output=output+
PI_BASE64_STR.charAt(enc1)+
PI_BASE64_STR.charAt(enc2)+
PI_BASE64_STR.charAt(enc3)+
PI_BASE64_STR.charAt(enc4);chr1=chr2=chr3="";enc1=enc2=enc3=enc4="";}while(i<input.length);return output;}
var ulmspaceId="97097114";function pi_ulm_trackDefaultCheckboxOn(spaceId,context,beaconElementId){pi_linktrack_beacon(document.getElementById(beaconElementId),{evt:"DefaultOn",_S:spaceId,_s:ulmspaceId,ctxt:context});}
function pi_ulm_trackDefaultCheckboxOff(spaceId,context,beaconElementId){pi_linktrack_beacon(document.getElementById(beaconElementId),{evt:"DefaultOff",_S:spaceId,_s:ulmspaceId,ctxt:context});}
function pi_ulm_trackEditLocationBoxWhenDefault(spaceId,context,beaconElementId){pi_linktrack_beacon(document.getElementById(beaconElementId),{evt:"editLoc",_S:spaceId,_s:ulmspaceId,ctxt:context});}
function pi_ulm_trackDropdownClick(spaceId,context,beaconElementId){pi_linktrack_beacon(document.getElementById(beaconElementId),{evt:"clickDropdown",_S:spaceId,_s:ulmspaceId,ctxt:context});}
function pi_ulm_trackRecentLocationClick(spaceId,context,beaconElementId){pi_linktrack_beacon(document.getElementById(beaconElementId),{evt:"clickRecent",_S:spaceId,_s:ulmspaceId,ctxt:context});}
function pi_ulm_trackSavedLocationClick(spaceId,context,beaconElementId){pi_linktrack_beacon(document.getElementById(beaconElementId),{evt:"clickSaved",_S:spaceId,_s:ulmspaceId,ctxt:context});}
function pi_ulm_trackSavedLocationSignInClick(spaceId,context,beaconElementId){pi_linktrack_beacon(document.getElementById(beaconElementId),{evt:"clickSignIn",_S:spaceId,_s:ulmspaceId,ctxt:context});}
function pi_ulm_trackEditSavedLocationClick(spaceId,context,beaconElementId){pi_linktrack_beacon(document.getElementById(beaconElementId),{evt:"clickEditSaved",_S:spaceId,_s:ulmspaceId,ctxt:context});}
function pi_ulm_trackClearRecentLocationClick(spaceId,context,beaconElementId){pi_linktrack_beacon(document.getElementById(beaconElementId),{evt:"clickClearRecent",_S:spaceId,_s:ulmspaceId,ctxt:context});}
function pi_ulm_trackWhatsThisClick(spaceId,context,beaconElementId){pi_linktrack_beacon(document.getElementById(beaconElementId),{evt:"clickWhatsThis",_S:spaceId,_s:ulmspaceId,ctxt:context});}
function pi_ulm_trackSetLocationFromRecent(spaceId,context,beaconElementId){pi_linktrack_beacon(document.getElementById(beaconElementId),{evt:"setFromRecent",_S:spaceId,_s:ulmspaceId,ctxt:context});}
function pi_ulm_trackSetLocationFromSaved(spaceId,context,beaconElementId){pi_linktrack_beacon(document.getElementById(beaconElementId),{evt:"setFromSaved",_S:spaceId,_s:ulmspaceId,ctxt:context});}
function pi_ulm_trackSetDefaultLocation(spaceId,context,beaconElementId){pi_linktrack_beacon(document.getElementById(beaconElementId),{evt:"setDefault",_S:spaceId,_s:ulmspaceId,ctxt:context});}
function pi_ulm_trackSetLocationAsNotDefault(spaceId,context,beaconElementId){pi_linktrack_beacon(document.getElementById(beaconElementId),{evt:"setNoDefault",_S:spaceId,_s:ulmspaceId,ctxt:context});}
function pi_ulm_trackInvalidLocation(spaceId,context,beaconElementId){pi_linktrack_beacon(document.getElementById(beaconElementId),{evt:"ErrInvalid",_S:spaceId,_s:ulmspaceId,ctxt:context});}
function pi_ulm_trackAmbiguousLocation(spaceId,context,beaconElementId){pi_linktrack_beacon(document.getElementById(beaconElementId),{evt:"ErrAmbiguous",_S:spaceId,_s:ulmspaceId,ctxt:context});}
function pi_ulm_trackGetLocation(spaceId,context,beaconElementId,type){var event="";if(type==0){event="getDefault";}
else if(type==1){event="getSubject";}
else if(type==2){event="getRecent";}
else if(type==3){event="getReg";}
else if(type==4){event="getSaved";}
pi_linktrack_beacon(document.getElementById(beaconElementId),{evt:event,_S:spaceId,_s:ulmspaceId,ctxt:context});}
if(oYULM==undefined){var oYULM;}
if(yulmParams==undefined){var yulmParams=new Array();}
if(oRPC==undefined){var oRPC=ygConn.getObject();}
function yulm()
{var trackingbeacon=document.createElement('img');trackingbeacon.id='beacon';trackingbeacon.width=1;trackingbeacon.height=1;trackingbeacon.setAttribute('src',ULMBEACONURL);document.body.appendChild(trackingbeacon);this.id='';this.showform=0;this.isopen=0;this.listclick=0;tmp=document.createElement('div');tmp.setAttribute('id','yulm');tmp.innerHTML='<h4>Loading...</h4>';document.body.appendChild(tmp);function yulmCloser(e)
{if(oYULM.isopen==0)return;if(!e)var e=window.event;if(e.target)targ=e.target;else if(e.srcElement)targ=e.srcElement;if(targ.nodeType==3)targ=targ.parentNode;if(targ.id==oYULM.trigger)return;var n=targ;do{if(n.nodeName=="DIV")
{if(n.id&&n.id=="yulm")
{return;}}
n=n.parentNode;}
while(n.nodeName!="HTML")
oYULM.isopen=0;oYULM.hide();}
yui.Event.addListener(document,"mousedown",yulmCloser,oYULM);}
yulm.prototype.hide=function()
{document.getElementById('yulm').style.display='none';}
yulm.prototype.show=function()
{document.getElementById('yulm').style.display='block';if(typeof(yguc)!="undefined"&&yguc.bindChildElements)yguc.bindChildElements(document.getElementById('yulm'));}
yulm.prototype.visible=function(){document.getElementById('yulm').style.visibility='visible';oYULM.isvisible=1;}
yulm.prototype.hidden=function(){document.getElementById('yulm').style.visibility='hidden';oYULM.isvisible=0;}
yulm.prototype.getData=function(url)
{var div=document.getElementById('yulm');div.innerHTML='<div id="yulminner"><h4>Retrieving Location Data...</h4></div>';var fN=function callback()
{var raw=arguments[0].responseText;var reg=new RegExp('<!--.+-->','g');var data=raw.replace(reg,"");div.innerHTML=data;var fNClear=function()
{url=this.href;divRecent=document.getElementById('yulmrecent');divRecent.innerHTML='<h4>clearing...</h4>';ygConn.http.asyncRequest(oRPC,'GET',url,false,function(){divRecent.innerHTML='';},null,null);document.getElementById(oYULM.ftxtid).value='';document.getElementById(oYULM.fdefaultid).checked=true;pi_ulm_trackClearRecentLocationClick(oYULM.spaceid,oYULM.locationtype,'beacon');}
yui.Event.addListener(oYULM.ftxtid,'keyup',function(){pi_ulm_trackEditLocationBoxWhenDefault(oYULM.spaceid,oYULM.locationtype,'beacon');},oYULM);yui.Event.addListener(oYULM.fdefaultid,'mousedown',function(){ulm_track_checkbox(this,oYULM.locationtype);},oYULM);yui.Event.addListener('yulmclear','mousedown',fNClear,oYULM);yui.Event.addListener('yulmsavedsignin','mousedown',function(){pi_ulm_trackSavedLocationSignInClick(oYULM.spaceid,oYULM,locationtype,'beacon');},oYULM);yui.Event.addListener('yulmsave','mousedown',function(){pi_ulm_trackEditSavedLocationClick(oYULM.spaceid,oYULM.locationtype,'beacon');},oYULM);yui.Event.addListener('yulmwhat','mousedown',function(){pi_ulm_trackWhatsThisClick(oYULM.spaceid,oYULM.locationtype,'beacon');},oYULM);if(oYULM.showform==1)
{yulmCheckIsDefault(oYULM.anchor);yui.Event.addListener(oYULM.ftxtid,'keyup',function(){yulmCheckIsDefault(oYULM.anchor);});}};ygConn.http.asyncRequest(oRPC,'GET',url,false,fN,null,null);}
yulm.prototype.setPos=function(x,y)
{tEl=document.getElementById(this.id);tPos=ygPos.getPos(tEl);tH=tEl.offsetHeight;tW=tEl.offsetWidth;tX=tPos[0];tY=tPos[1];ulmEl=document.getElementById('yulm');ulmElW=ulmEl.offsetWidth;newulmX=(tX+x-(ulmElW-tW));if(newulmX<10)newulmX=10;ygPos.setX(ulmEl,newulmX);ygPos.setY(ulmEl,tY+tH+y);}
function yulmToggle(el,t,e,sh)
{if(!oYULM)
{oYULM=new yulm();}
var params=yulmParams[t];oYULM.trigger=el.id;oYULM.spaceid=params['spaceid'];oYULM.anchor=params['anchor'];oYULM.showform=params['showform'];oYULM.locationtype=params['locationtype'];oYULM.form=params['form'];oYULM.faction=params['faction'];oYULM.fmethod=params['fmethod'];oYULM.ftxtid=params['ftxtid'];oYULM.ftxtval=params['ftxtval'];oYULM.fdefaultid=params['fdefaultid'];oYULM.fsubmitid=params['fsubmitid'];oYULM.fsubmitlabel=params['fsubmitlabel'];oYULM.dataurl=params['dataurl'];oYULM.listclick='';if(oYULM.isopen==0||t!=oYULM.id)
{var url=oYULM.dataurl
+'tid='+t
+'&s='+oYULM.showform
+'&l='+oYULM.locationtype
+'&f='+oYULM.form
+'&fa='+oYULM.faction
+'&fm='+oYULM.fmethod
+'&ft='+oYULM.ftxtid
+'&ftv='+oYULM.ftxtval
+'&fd='+oYULM.fdefaultid
+'&fs='+oYULM.fsubmitid
+'&fsl='+oYULM.fsubmitlabel
+'&r='+Math.random();oYULM.getData(url);oYULM.id=t;oYULM.show();if(sh){oYULM.isopen=1;oYULM.visible();}else{oYULM.isopen=0;oYULM.hidden();}
oYULM.setPos(params['adjustX'],params['adjustY']);}
else if(sh)
{oYULM.isopen=0;oYULM.hide();}
return false;}
function yulmSubmit(el,tid,e)
{if(!oYULM){return false;};var params=yulmParams[tid];var l=params['locationtype'];var ft=document.getElementById(params['ftxtid']).value;if(ft=='')return;var ftval=(ft!='')?ft:'none';var fd=document.getElementById(params['fdefaultid']);var fdckd=(fd.checked)?1:0;var s=params['showform'];var qs='l='+l
+'&tid='+tid
+'&ftv='+ftval
+'&s='+s
+'&lc='+oYULM.listclick
+'&fdckd='+fdckd;if(oYULM.unqid)
{qs+='&unqid='+oYULM.unqid;}
qs+='&r='+Math.random();var url=params['validateurl']+qs;oYULM.unqid=null;var fN=function callBack()
{var raw=arguments[0].responseText;var reg=new RegExp('<!--.+-->','g');var data=raw.replace(reg,'');eval("var err = "+data);if(err['type']==1||err['type']==2)
{params['ftxtval']=ftval;if(fdckd)params['ftxtdefault']=ftval;if(!params['fonsubmit']&&err['type']==1)
{oFORM=document.getElementById(params['form']);oFORM.submit();}
else
{if(oYULM.isopen==1&&oYULM.showform===1){oYULM.isopen=0;oYULM.hide();}
if(err['type']==1){args={l:l,ft:ft,ftval:ftval,fd:fd,fdckd:fdckd};yulmAltSubmit(params['fonsubmit'],args);}else if(err['type']==2){yulmAltSubmit(params['fonsubmit'],err['args']);}}
switch(oYULM.listclick)
{case'R':pi_ulm_trackSetLocationFromRecent(oYULM.spaceid,oYULM.locationtype,'beacon');break;case'S':pi_ulm_trackSetLocationFromSaved(oYULM.spaceid,oYULM.locationtype,'beacon');break;}}
else
{error_message={type:err['type'],msg:err['msg'],keyword:ftval};yulmAppendError(error_message);}};ygConn.http.asyncRequest(oRPC,'GET',url,false,fN,null,null);}
function yulmAppendError(err)
{if(oYULM.isopen==0)oYULM.show();if(oYULM.isvisible==0)oYULM.visible();switch(err['type'])
{case-1:errTxt='Your search produced no matches';errSub='Please re-enter a City &amp; State, or U.S. ZIP code';pi_ulm_trackInvalidLocation(oYULM.spaceid,oYULM.locationtype,'beacon');break;case-2:errTxt='Your search for "'+err['keyword']+'" produced multiple matches';errSub='Please select your preferred location below:';pi_ulm_trackAmbiguousLocation(oYULM.spaceid,oYULM.locationtype,'beacon');break;}
var oERR=document.getElementById('yulmerror');oERR.innerHTML='';oERR.innerHTML='<h5>'+errTxt+'</h5>'
+'<h6>'+errSub+'</h6>'
+err['msg'];oYULM.isopen=1;}
function yulmClearError()
{if(document.getElementById('yulmerror')){var oERR=document.getElementById('yulmerror');oERR.innerHTML='';}}
function yulmAltSubmit(o,args){o(args);}
function yulmFillLoc(l,tid,lt,s,d,i,unqid)
{if(unqid)
{oYULM.unqid=unqid;}
var params=yulmParams[oYULM.id];var isdefault=s;var s=params["showform"];var fdefault=document.getElementById(oYULM.fdefaultid);oYULM.listclick=lt;oYULM.intl=i;document.getElementById(oYULM.ftxtid).value=l;switch(lt)
{case'R':pi_ulm_trackRecentLocationClick(oYULM.spaceid,oYULM.locationtype,'beacon');break;case'S':pi_ulm_trackSavedLocationClick(oYULM.spaceid,oYULM.locationtype,'beacon');break}
pi_ulm_trackGetLocation(oYULM.spaceid,oYULM.locationtype,'beacon',lt);yulmCheckIsDefault(params['anchor']);if(!s)
{oYULM.isopen=0;oYULM.hide();}}
function yulmCheckIsDefault(anchor,e){var params=yulmParams[anchor];var theform=params['form'];var txtfield=document.getElementById(params['ftxtid']);var ckbx=document.getElementById(params['fdefaultid']);var defaultloc=params['ftxtdisplay'];var hasdefaultloc=params['ftxtdisplayisdefault'];ckbx.checked=(txtfield.value==''||(hasdefaultloc==1&&(txtfield.value.toLowerCase()==defaultloc.toLowerCase())))?true:false;if(hasdefaultloc&&ckbx.checked==false)
{pi_ulm_trackEditLocationBoxWhenDefault(oYULM.spaceid,oYULM.locationtype,'beacon');}
if(e&&e.type=='keyup'&&((e.which&&e.which==13)||(e.keyCode&&e.keyCode==13)))
{yulmSubmit(this,anchor,e);}}
function yulmAttachUlm(t)
{yulmGetStyles();yulmParams[t['anchor']]=t;var tr=t['triggers'];var trlen=tr.length;for(i=0;i<trlen;i++)
{if(tr[i][2]==1){yui.Event.addListener(tr[i][0],tr[i][1],function(){yulmToggle(this,t['anchor'],999,1);});yui.Event.addListener(tr[i][0],'mousedown',function(){pi_ulm_trackDropdownClick(t['spaceid'],t['locationtype'],'beacon');});}else{yui.Event.addListener(tr[i][0],tr[i][1],function(){yulmToggle(this,t['anchor'],999,0);});yui.Event.addListener(tr[i][0],'mousedown',function(){pi_ulm_trackDropdownClick(t['spaceid'],t['locationtype'],'beacon');});}}
if(t['showform']==0)
{yui.Event.addListener(t['fdefaultid'],'click',function(){ulm_track_checkbox(this,t['locationtype']);});yui.Event.addListener(t['ftxtid'],'keyup',function(e){yulmCheckIsDefault(t['anchor'],e);});}
if(t['fsubmitid']!=''&&t['showform']==0&&t['validateurl']!='')
{yui.Event.addListener(t['fsubmitid'],'click',function(e){yulmSubmit(this,t['anchor'],e);});}}
function yulmGetStyles(){if(!document.getElementById('ulm_styles')){var ulm_styles=document.createElement('link');ulm_styles.id='ulm_styles';ulm_styles.setAttribute('rel','stylesheet');ulm_styles.setAttribute('type','text/css');ulm_styles.setAttribute('href',ULMCSSURL);document.getElementsByTagName('head')[0].appendChild(ulm_styles);}}
ulm_track_default=-1;ulm_track_type=-1;function ulm_track_checkbox(o,tloc)
{if(o.checked)
{ulm_track_default=1;o.checked=true;pi_ulm_trackDefaultCheckboxOn(oYULM.spaceid,tloc,"beacon");}
else
{ulm_track_default=0;o.checked=false;pi_ulm_trackDefaultCheckboxOff(oYULM.spaceid,tloc,"beacon");}}
function ulm_track_setLocation(type,tloc)
{switch(tloc)
{case'local':thecheckbox=d.sf1.ulmdefault;break;case'weather':thecheckbox=d.w.we;break;}
if(ulm_track_default==1)
{pi_ulm_trackSetDefaultLocation(oYULM.spaceid,tloc,"beacon");}
else
{pi_ulm_trackSetLocationAsNotDefault(oYULM.spaceid,tloc,"beacon");}
switch(type)
{case'recentloc':pi_ulm_trackSetLocationFromRecent(oYULM.spaceid,tloc,"beacon");break;case'savedloc':pi_ulm_trackSetLocationFromSaved(oYULM.spaceid,tloc,"beacon");break;}}function ulm_track_setLocation(type,tloc)
{switch(tloc)
{case'local':thecheckbox=d.sf1.ulmdefault;break;case'weather':thecheckbox=d.w.we;break;}
if(ulm_track_default==1)
{pi_ulm_trackSetDefaultLocation(oYULM.spaceid,tloc,"beacon");}
else
{pi_ulm_trackSetLocationAsNotDefault(oYULM.spaceid,tloc,"beacon");}
switch(type)
{case'recentloc':pi_ulm_trackSetLocationFromRecent(oYULM.spaceid,tloc,"beacon");break;case'savedloc':pi_ulm_trackSetLocationFromSaved(oYULM.spaceid,tloc,"beacon");break;}}