function SelectThis(obj,nurl){var newUrl=nurl+"&ps="+obj.options[obj.options.selectedIndex].value+"&pg=1";GotoPage(newUrl);}
function GotoPage(url){document.forms[0].action=url;document.forms[0].method="post";document.forms[0].submit();}
function hideToolTip(){var objFl=document.getElementById("dvFloat");if(objFl){objFl.style.display='none';}}
function setSearchBlank(searchObj){if(searchObj.value=="Search For"){searchObj.value="";}}
function rmspaces(x){var leftx=0;var rightx=x.length-1;while(x.charAt(leftx)==' ')leftx++;while(x.charAt(rightx)==' ')--rightx;var q=x.substr(leftx,rightx-leftx+1);if((leftx==x.length)&&(rightx==-1))q='';return(q)}
function replaceAll(strText,find,replace){var strReplaceAll=strText;var intIndexOfMatch=strReplaceAll.indexOf(find);while(intIndexOfMatch!=-1){strReplaceAll=strReplaceAll.replace(find,replace);intIndexOfMatch=strReplaceAll.indexOf(find,intIndexOfMatch);}
return strReplaceAll;}
function URLSafe(strText){strText=replaceAll(strText,"."," ");strText=replaceAll(strText,"/"," ");strText=replaceAll(strText,"\\"," ");strText=replaceAll(strText,","," ");strText=replaceAll(strText,"#"," ");strText=replaceAll(strText,"&"," ");strText=replaceAll(strText,"?"," ");strText=replaceAll(strText," ","-");return strText;}
function SIFRReplace(){if(typeof sIFRReplaced=="undefined"){if(typeof sIFR=="function"){sIFR.replaceElement(named({sSelector:"h1",sFlashSrc:"/sifr/h1.swf",sWmode:"opaque",sColor:"#1b5680"}));sIFR.replaceElement(named({sSelector:"h2",sFlashSrc:"/sifr/h2.swf",sWmode:"opaque",sColor:"#1b5680"}));sIFR.replaceElement(named({sSelector:"h3",sFlashSrc:"/sifr/h3.swf",sWmode:"opaque",sColor:"#7f7f7f"}));sIFR.replaceElement(named({sSelector:"h4",sFlashSrc:"/sifr/h4.swf",sWmode:"opaque",sColor:"#1b5680"}));sIFR.replaceElement(named({sSelector:"h5",sFlashSrc:"/sifr/h5.swf",sWmode:"opaque",sColor:"#1b5680"}));sIFRReplaced="1";};}}
function _showToolTip(objID,contentID,width,topMargin,leftMargin){var x=0;var y=0;var contentTxt="";var objFl=document.getElementById("dvFloat");if(objFl){var par=document.getElementById(objID);if(par){x=getX(par);y=getY(par);}
par=document.getElementById(contentID);if(par){contentTxt="<table width="+width+" border=0 cellpadding=0 cellspacing=0><tr><td width=18 align=left valign=top><img src='/images/popup/tip_tl.jpg' width=18 height=18 /></td>";contentTxt+="<td align=left valign=top background='/images/popup/tip_tm.jpg'></td><td width=18 align=right valign=top><img src='/images/popup/tip_tr.jpg' width=18 height=18 /></td></tr>";contentTxt+="<tr><td align=left valign=top background='/images/popup/tip_lm.jpg'>&nbsp;</td><td align=left valign=top bgcolor='#ffffff' class=grey>";contentTxt+=par.innerHTML;contentTxt+="</td><td align=right valign=top background='/images/popup/tip_rm.jpg'>&nbsp;</td></tr><tr>";contentTxt+="<td align=left valign=top><img src='/images/popup/tip_lb.jpg' width=18 height=18 /></td>";contentTxt+="<td align=left valign=top background='/images/popup/tip_bm.jpg'>&nbsp;</td>";contentTxt+="<td align=right valign=top><img src='/images/popup/tip_br.jpg' width=18 height=18 /></td></tr></table>";}
objFl.style.display='block';objFl.style.position="absolute";objFl.style.top=AddPx(y+topMargin);objFl.style.left=AddPx(x+leftMargin);objFl.innerHTML=contentTxt;}}
function showToolTip(objID,contentID){_showToolTip(objID,contentID,400,20,0);}
function getNumber(value){var n=parseInt(value);return n==null||isNaN(n)?0:n;}
function getY(el){var ot=el.offsetTop;while((el=el.offsetParent)!=null){ot+=el.offsetTop;}return ot;}
function getX(el){var ol=el.offsetLeft;while((el=el.offsetParent)!=null){ol+=el.offsetLeft;}return ol;}
function getY1(el){var ot=this.getY(el)+el.offsetHeight;return ot;}
function getX1(el){var ot=this.getX(el)+el.offsetWidth;return ot;}
function AddPx(num){return String(num)+"px";}
function GotoURL(url){location.href=url;return false;}
function doAction(action,actionval){document.getElementById("pgaction").value=action;document.getElementById("pgactionval").value=actionval;document.forms[0].submit();}
function doActionPage(obj){var val=obj.options[obj.options.selectedIndex].value;doAction("pagesize",val);}
function setCookie(c_name,value,expiredays){var exdate=new Date();exdate.setDate(exdate.getDate()+expiredays);document.cookie=c_name+"="+escape(value)+
((expiredays==null)?"":";expires="+exdate.toGMTString());}
function getCookie(c_name){if(document.cookie.length>0){c_start=document.cookie.indexOf(c_name+"=");if(c_start!=-1){c_start=c_start+c_name.length+1;c_end=document.cookie.indexOf(";",c_start);if(c_end==-1)c_end=document.cookie.length;return unescape(document.cookie.substring(c_start,c_end));}}
return"";}
var sortFld="3";var sortOrd="";function Sort(fld,tableName,type){if(fld==sortFld){if(sortOrd==""){sortOrd="D";}else{sortOrd="";}}else{sortFld=fld;sortOrd="";}
var compareCol="";var tblDV=document.getElementById(tableName);var tRows=tblDV.getElementsByTagName('tr');var tCols;var OrgRows=Array();var tmpVar;var tr,td;var totalRows=tRows.length;for(var i=0,l=totalRows;i<l;i++){OrgRows[i]=tRows[i];}
for(var i=totalRows-2;i>=0;i--){for(j=0;j<=i;j++){if(CompareCell(OrgRows[j].cells[fld],OrgRows[j+1].cells[fld],type,sortOrd)){tmpVar=OrgRows[j];OrgRows[j]=OrgRows[j+1];OrgRows[j+1]=tmpVar;}}}
tRows=tblDV.getElementsByTagName('tr')
for(var i=tRows.length-1;i>=0;i--)
{tRows[i].parentNode.removeChild(tRows[i]);}
var tBody=tblDV.getElementsByTagName('tbody')[0];for(i=totalRows-1;i>=0;i--)
{tr=document.createElement("tr");tr.className="rowwhite fs12";tr.setAttribute("class","rowwhite fs12");var cells=OrgRows[i].cells;if(document.all){cells=OrgRows[i].childNodes;}
for(c=0,cl=cells.length;c<cl;c++)
{td=document.createElement("td");td.className=cells[c].className;td.setAttribute("class",cells[c].getAttribute("class"));td.setAttribute("width",cells[c].getAttribute("width"));td.setAttribute("vAlign",cells[c].getAttribute("vAlign"));td.setAttribute("align",cells[c].getAttribute("align"));td.innerHTML=cells[c].innerHTML;tr.appendChild(td);}
tBody.appendChild(tr);}}
function CompareCell(a,b,fld,ord)
{var f1=a.textContent;if(!f1){f1=a.innerText;}
var f2=b.textContent;if(!f2){f2=b.innerText;}
if(fld==4){var cell1=parseFloat(f1);cell1=(isNaN(cell1)?0:cell1);var cell2=parseFloat(f2);cell2=(isNaN(cell2)?0:cell2);}else if(fld==3){var cell1=Date.parse(f1);var cell2=Date.parse(f2);}else{var cell1=f1.toUpperCase();var cell2=f2.toUpperCase();}
if(cell1<cell2&&ord==""){return true;}else{return false;}}
String.prototype.endsWith = function(str){return (this.match(str+"$")==str)};