
function getPathInfo(location)
{var fileExtension='.aspx';var index=location.indexOf(fileExtension,0);var pathInfo=location.substring(index+fileExtension.length,location.length);if(pathInfo.indexOf('#',0)>=0)
{pathInfo=pathInfo.substring(0,pathInfo.indexOf('#',0));}
var pathInfoList=pathInfo.split('/');var pathInfoPairCount=pathInfoList.length-1;if(pathInfoPairCount<0)
{pathInfoPairCount=0;}
var pathInfoPairList=new Array(pathInfoPairCount);for(i=0;i<pathInfoList.length;i++)
{if(pathInfoList[i]!='')
{var pathInfoItem=pathInfoList[i];var pathInfoPair=new Array(2);var equalsIndex=pathInfoItem.indexOf('=');if(equalsIndex>0)
{pathInfoPair[0]=pathInfoItem.substring(0,equalsIndex);pathInfoPair[1]=pathInfoItem.substring(equalsIndex+1,pathInfoItem.length);}
else
{pathInfoPair[0]=pathInfoItem;pathInfoPair[1]=pathInfoItem;}
pathInfoPairList[i-1]=pathInfoPair;}}
return pathInfoPairList;}
function hasPathInfoKey(pathInfo,key)
{var found=false;if(pathInfo!=null)
{for(i=0;i<pathInfo.length;i++)
{if(pathInfo[i][0]==key)
{found=true;break;}}}
return found;}
function getPathInfoValue(pathInfo,key)
{var value=null;if(pathInfo!=null)
{for(i=0;i<pathInfo.length;i++)
{if(pathInfo[i][0]==key)
{value=pathInfo[i][1];break;}}}
return value;}
function popupWindow(url,name,width,height,properties){if(!name)name="popWin";if(!width)width="700";if(!height)height="480";var features="width="+width+",height="+height;if(!properties||properties==false){features+=",left=100,top=100,toolbar=0,location=0,directories=0,status=0,menubar=0,resizable=1,scrollbars=1";}else{features+=properties;}
var popWin=window.open(url,name,features);checkPopped(popWin);return popWin;}
function checkPopped(winName){if(winName)
winName.focus();else{var popupWarning='Pop-up blocking software in your browser has prevented us from opening a new window. In order for this site to function properly please disable your Pop-up blocking software for this site.';alert(popupWarning);return;}}
function toggleDisplay(elmID,defaultDisplay,force){if(document.getElementById){var elmStyle=document.getElementById(elmID).style;}else if(document.all){var elmStyle=document.all[elmID].style;}else if(document.layers){var elmStyle=document.layers[elmID].style;}
if(force)
{elmStyle.display=defaultDisplay;return;}
else if(!defaultDisplay)
{var elmType=document.getElementById(elmID).tagName.toLowerCase();if(elmType=='a'||elmType=='span'||elmType=='strong'||elmType=='em')
var defaultDisplay='inline';else
var defaultDisplay='block';}
if(elmStyle.display=='none'){elmStyle.display=defaultDisplay;}else{elmStyle.display='none';}}
function socialBookmark(service,url,title)
{var newLocation;if(service=="digg")
newLocation='http://digg.com/submit?phase=2&url='+escape(url);else if(service=="delicious")
newLocation='http://del.icio.us/post?v=2&url='+escape(url)+'&title='+escape(title);else if(service=="reddit")
newLocation='http://reddit.com/submit?title='+escape(title)+'&url='+escape(url);else if(service=="technorati")
newLocation='http://technorati.com/faves?sub=favthis&add='+escape(url);else if(service=="stumbleupon")
newLocation='http://www.stumbleupon.com/submit?title='+escape(title)+'&url='+escape(url);location.href=newLocation;}
function selectedIndexChangedSetHidden(ddl,hid){if(ddl.options&&typeof(ddl.selectedIndex)=="number"&&ddl.options.length>ddl.selectedIndex){hid.value=ddl.options[ddl.selectedIndex].value;var frm=document.forms[0];frm.submit();}}
function createCookie(name,value,days){if(days){var date=new Date();date.setTime(date.getTime()+(days*24*60*60*1000));var expires="; expires="+date.toGMTString();}
else var expires="";document.cookie=name+"="+value+expires+"; path=/";}
function selectedIndexChangedSetCookie(ddl,cookiename){if(ddl.options&&typeof(ddl.selectedIndex)=="number"&&ddl.options.length>ddl.selectedIndex){createCookie(cookiename,ddl.options[ddl.selectedIndex].value,1);}}