function submitOnce(form){submitOnce=blockSubmit;return true;}
function blockSubmit(form){return false;}
function unhideTopics(){if(document.layers){document.layers['hiddenTopics'].display='block';}
else if(document.all){document.all('hiddenTopics').style.display='block';}
else if(document.getElementById){document.getElementById('hiddenTopics').style.display='block';}
return false;}
function jsImport(file){fileName=file;if(file.indexOf(".")>=0){fileNameParts=file.split(".");fileName="/scripts/"+fileNameParts.join("/")+".js";}
document.write("<script type=\"text/javascript\" src=\""+fileName+"\"></script>\n");}
function removeChildren(node){var childCount=node.childNodes.length;for(var i=0;i<childCount;i++){var child=node.childNodes[0];node.removeChild(child);}}
function toggleSection(sectionName,timeoutDays){headerID=sectionName+"Header";bodyID=sectionName+"Body";header=document.getElementById(headerID);toggleElementVisibility(bodyID);if(isElementVisible(bodyID)==true)
header.className='collapsibleSectionHeader collapsibleSectionExpanded';else
header.className='collapsibleSectionHeader collapsibleSectionCollapsed';if(timeoutDays==null)
timeoutDays=1000;createCookie(sectionName+"Collapsed",isSectionCollapsed(sectionName),timeoutDays);}
function isSectionCollapsed(sectionName){if(isElementVisible(sectionName+"Body"))
return false;else
return true;}
function isElementVisible(elementID){var element=document.getElementById(elementID);if(element.style.visibility!='hidden'&&element.style.display!='none'){return true;}else{return false;}}
function toggleElementVisibility(elementID,show){if(show==null)
show=!isElementVisible(elementID);if(show==true)
showElement(elementID);else
hideElement(elementID);}
function hideElement(elementID){var element=document.getElementById(elementID);if(element!=null){element.style.display='none';element.style.visibility='hidden';}}
function showElement(elementID,style){if(style==null)
style='block';var element=document.getElementById(elementID);if(element!=null){element.style.display=style;element.style.visibility='visible';}}
function trim(s){while(s.substring(0,1)==' '){s=s.substring(1,s.length);}
while(s.substring(s.length-1,s.length)==' '){s=s.substring(0,s.length-1);}
return s;}
function dateAdd(daysAhead){var date=new Date();var days=date.getDate();date.setDate(days+daysAhead);return date;}
function setText(elementID,text){var element=document.getElementById(elementID);var oldText=element.childNodes[0];var newText=document.createTextNode(text);if(oldText==null)
element.appendElement(newText);else
element.replaceChild(newText,oldText);}
function clearSearchBox(searchBox,defaultValue)
{if(searchBox.value==defaultValue)
{searchBox.value='';}}
function clearTextInputClass(inputID)
{var input=document.getElementById(inputID);if(input!=null)
{input.className='text';}}
function getFormElementValue(element){var value;if(element==null)
alert(elementID+" is null");if(element.type=="select-one"){var options=element.options;value=options[options.selectedIndex];}
if(element.type=="hidden"||element.type=="text"||element.type=="textarea")
value=element.value;}
function setFormElementValue(elementID,value){var element=document.getElementById(elementID);if(element==null)
alert(elementID+" is null");if(element.type=="select-one"){var options=element.options;for(var i=0;i<options.length;i++){if(options[i].value==value)
options[i].selected=true;}}
if(element.type=="hidden"||element.type=="text"||element.type=="textarea")
element.value=value;if(element.type=="checkbox"){if(value==true)
element.checked=true;else
element.checked=false;}
if(element.type=="radio"){if(value=element.value)
element.checked=true;else
element.checked=false;}}
function changeButtonText(newText){var newNode=document.createTextNode(newText);var button=document.getElementById("saveSearchFormSubmit")
var buttonDiv=button.childNodes[0];var oldNode;for(var i=0;i<buttonDiv.childNodes.length;i++){if(buttonDiv.childNodes[i].data!=null)
oldNode=buttonDiv.childNodes[i];}
buttonDiv.replaceChild(newNode,oldNode);}
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 readCookie(name)
{var nameEQ=name+"=";var ca=document.cookie.split(';');for(var i=0;i<ca.length;i++)
{var c=ca[i];while(c.charAt(0)==' ')c=c.substring(1,c.length);if(c.indexOf(nameEQ)==0)return c.substring(nameEQ.length,c.length);}
return null;}
function eraseCookie(name)
{createCookie(name,"",-1);}
function isValueInArray(array,value)
{for(var index=0;index<array.length;index++)
if(array[index]===value)
return true;return false;}
function changeFormSubmitLocToGoogle(inputID,formID,radioID)
{var input=document.getElementById(inputID);var radio=document.getElementById(radioID);var form=document.getElementById(formID);if(radio.checked)
{var val='http://www.google.com/search';input.value='site:www.experts-exchange.com '+input.value;form.action=val;}}
function addCookieToIFrame(frameID,cookie,value)
{document.getElementById(frameID).src="/setFrameCookie.jsp?id="+frameID+"&cookie="+cookie+"&value="+value;}
function getElementPositionById(id)
{return getElementPosition(document.getElementById(id));}
function getElementPosition(element)
{var left=0;var top=0;if(element.offsetParent)
{left=element.offsetLeft;top=element.offsetTop;while(element=element.offsetParent)
{left+=element.offsetLeft;top+=element.offsetTop;}}
return[left,top];}
function scrollToElementById(id)
{return scrollToElement(document.getElementById(id));}
function scrollToElement(element)
{var position=getElementPosition(element);window.scrollTo(position[0],position[1]);}
function closeSection(id)
{var element=document.getElementById();element.style.display='none';}
function showInfoBox(e,id){var posX=0,posY=0;if(!e)
var e=window.event;if(e.pageX||e.pageY){posX=e.pageX;posY=e.pageY;}
else if(e.clientX||e.clientY){posX=e.clientX;posY=e.clientY;if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){posX+=document.documentElement.scrollLeft;posY+=document.documentElement.scrollTop;}
else if(document.body.scrollLeft||document.body.scrollTop){posX+=document.body.scrollLeft;posY+=document.body.scrollTop;}}
var style=document.getElementById(id).style;style.left=posX+"px";style.top=posY+"px";style.display="inline";}
function showConfirmBox(e,id,url){showInfoBox(e,id);document.getElementById("confirmLink"+id).href=url;}
function showAnswerRatingBox(e,answerID){showInfoBox(e,"answerRatingBox");document.answerRatingBoxForm.aid.value=answerID;}
function hideInfoBox(id){document.getElementById(id).style.display="none";}
function callAsync(url,id){new AsyncInclude(url,id);}