function BJUtil(){}BJUtil.loggedInPerson=new Object;BJUtil.loggedInPerson.isReviewer=false;BJUtil.onReturn=function(a,b){if(!a){a=window.event}if(a&&a.keyCode&&a.keyCode==13){b()}};BJUtil.intToOrdinalString=function(d){var b=new Array();b[0]="noughth";b[1]="first";b[2]="second";b[3]="third";b[4]="fourth";b[5]="fifth";b[6]="sixth";b[7]="seventh";b[8]="eighth";b[9]="ninth";b[10]="tenth";b[11]="eleventh";b[12]="twelfth";b[13]="thirteenth";b[14]="fourteenth";b[15]="fifteenth";b[16]="sixteenth";b[17]="seventeenth";b[18]="eightteenth";b[19]="nineteenth";b[20]="twentyth";var a=new Array();a[0]="th";a[1]="st";a[2]="nd";a[3]="rd";a[4]="th";a[5]="th";a[6]="th";a[7]="th";a[8]="th";a[9]="th";if(d>20||d<0){var c=String(d);return(c+a[c.substring(c.length-1)])}else{return b[d]}};BJUtil.getDisabledClassName=function(c){var a="";if(c.className.indexOf("submitG_w")>=0){var b=c.className.substr(c.className.indexOf("submitG_w")+9,3);a="submitG_w"+b}else{if(c.className.indexOf("submitG")>=0){a="submitG"}else{if(c.className.indexOf("submit")>=0){a="submit"}}}if(a!=""){a=a+"-disabled"}return a};BJUtil.disable=function(a){YAHOO.util.Dom.addClass(a,"disabled");YAHOO.util.Dom.addClass(a,BJUtil.getDisabledClassName(a));a.style.backgroundImage=""};BJUtil.enable=function(a){YAHOO.util.Dom.removeClass(a,"disabled");YAHOO.util.Dom.removeClass(a,BJUtil.getDisabledClassName(a))};BJUtil.selectRange=function(c,e,a){var d=c;c=$(c);if(c==null){BJUtil.debug("selectRange() can't find an element with id: "+d+".");return}if(c.setSelectionRange){c.setSelectionRange(e,a)}else{if(c.createTextRange){var b=c.createTextRange();b.moveStart("character",e);b.moveEnd("character",a-c.value.length);b.select()}}c.focus()};BJUtil._getSelection=function(a){var b=a;a=$(a);if(a==null){BJUtil.debug("selectRange() can't find an element with id: "+b+".");return}return a.value.substring(a.selectionStart,a.selectionEnd)};var $;if(!$&&document.getElementById){$=function(){var c=new Array();for(var b=0;b<arguments.length;b++){var a=arguments[b];if(typeof a=="string"){a=document.getElementById(a)}if(arguments.length==1){return a}c.push(a)}return c}}else{if(!$&&document.all){$=function(){var c=new Array();for(var b=0;b<arguments.length;b++){var a=arguments[b];if(typeof a=="string"){a=document.all[a]}if(arguments.length==1){return a}c.push(a)}return c}}}BJUtil.toDescriptiveString=function(h,c,f){var d="";var j=0;var m;var g;if(c==null){c=0}if(f==null){f=0}if(h==null){return"null"}if(BJUtil._isArray(h)){if(h.length==0){d+="[]"}else{if(c!=0){d+="[\n"}else{d="["}for(j=0;j<h.length;j++){try{g=h[j];if(g==null||typeof g=="function"){continue}else{if(typeof g=="object"){if(c>0){m=BJUtil.toDescriptiveString(g,c-1,f+1)}else{m=BJUtil._detailedTypeOf(g)}}else{m=""+g;m=m.replace(/\/n/g,"\\n");m=m.replace(/\/t/g,"\\t")}}}catch(l){m=""+l}if(c!=0){d+=BJUtil._indent(c,f+2)+m+", \n"}else{if(m.length>13){m=m.substring(0,10)+"..."}d+=m+", ";if(j>5){d+="...";break}}}if(c!=0){d+=BJUtil._indent(c,f)+"]"}else{d+="]"}}return d}if(typeof h=="string"||typeof h=="number"||BJUtil._isDate(h)){return h.toString()}if(typeof h=="object"){var e=BJUtil._detailedTypeOf(h);if(e!="Object"){d=e+" "}if(c!=0){d+="{\n"}else{d="{"}var a=BJUtil._isHTMLElement(h);for(var b in h){if(a){if(b.toUpperCase()==b||b=="title"||b=="lang"||b=="dir"||b=="className"||b=="form"||b=="name"||b=="prefix"||b=="namespaceURI"||b=="nodeType"||b=="firstChild"||b=="lastChild"||b.match(/^offset/)){continue}}m="";try{g=h[b];if(g==null||typeof g=="function"){continue}else{if(typeof g=="object"){if(c>0){m="\n";m+=BJUtil._indent(c,f+2);m=BJUtil.toDescriptiveString(g,c-1,f+1)}else{m=BJUtil._detailedTypeOf(g)}}else{m=""+g;m=m.replace(/\/n/g,"\\n");m=m.replace(/\/t/g,"\\t")}}}catch(l){m=""+l}if(c==0&&m.length>13){m=m.substring(0,10)+"..."}var k=b;if(k.length>30){k=k.substring(0,27)+"..."}if(c!=0){d+=BJUtil._indent(c,f+1)}d+=b+":"+m+", ";if(c!=0){d+="\n"}j++;if(c==0&&j>5){d+="...";break}}d+=BJUtil._indent(c,f);d+="}";return d}return h.toString()};BJUtil._indent=function(d,c){var b="";if(d!=0){for(var a=0;a<c;a++){b+="\u00A0\u00A0"}b+=" "}return b};BJUtil.useLoadingMessage=function(a){var b;if(a){b=a}else{b="Loading"}DWREngine.setPreHook(function(){var d=$("disabledZone");if(!d){d=document.createElement("div");d.setAttribute("id","disabledZone");d.style.position="absolute";d.style.zIndex="1000";d.style.left="0px";d.style.top="0px";d.style.width="100%";d.style.height="100%";document.body.appendChild(d);var c=document.createElement("div");c.setAttribute("id","messageZone");c.style.position="absolute";c.style.top="0px";c.style.right="0px";c.style.background="red";c.style.color="white";c.style.fontFamily="Arial,Helvetica,sans-serif";c.style.padding="4px";d.appendChild(c);var e=document.createTextNode(b);c.appendChild(e)}else{$("messageZone").innerHTML=b;d.style.visibility="visible"}});DWREngine.setPostHook(function(){$("disabledZone").style.visibility="hidden"})};BJUtil.setValue=function(e,f,b){if(f==null){f=""}if(b!=null){if(b.escapeHtml){f=f.replace(/&/,"&amp;");f=f.replace(/'/,"&apos;");f=f.replace(/</,"&lt;");f=f.replace(/>/,"&gt;")}}var g=e;var a,d,c;e=$(e);if(e==null){a=document.getElementsByName(g);if(a.length>=1){e=a.item(0)}}if(e==null){BJUtil.debug("setValue() can't find an element with id/name: "+g+".");return}if(BJUtil._isHTMLElement(e,"select")){if(e.type=="select-multiple"&&BJUtil._isArray(f)){BJUtil._selectListItems(e,f)}else{BJUtil._selectListItem(e,f)}return}if(BJUtil._isHTMLElement(e,"input")){if(e.type=="radio"){if(a==null){a=document.getElementsByName(g)}if(a!=null&&a.length>1){for(c=0;c<a.length;c++){d=a.item(c);if(d.type=="radio"){d.checked=(d.value==f)}}}else{e.checked=(f==true)}}else{if(e.type=="checkbox"){e.checked=f}else{e.value=f}}return}if(BJUtil._isHTMLElement(e,"textarea")){e.value=f;return}if(f.nodeType){if(f.nodeType==9){f=f.documentElement}f=BJUtil._importNode(e.ownerDocument,f,true);e.appendChild(f);return}e.innerHTML=f};BJUtil._selectListItems=function(d,e){var c=false;var b;var a;for(b=0;b<d.options.length;b++){d.options[b].selected=false;for(a=0;a<e.length;a++){if(d.options[b].value==e[a]){d.options[b].selected=true}}}if(c){return}for(b=0;b<d.options.length;b++){for(a=0;a<e.length;a++){if(d.options[b].text==e[a]){d.options[b].selected=true}}}};BJUtil._selectListItem=function(c,d){var b=false;var a;for(a=0;a<c.options.length;a++){if(c.options[a].value==d){c.options[a].selected=true;b=true}else{c.options[a].selected=false}}if(b){return}for(a=0;a<c.options.length;a++){if(c.options[a].text==d){c.options[a].selected=true}else{c.options[a].selected=false}}};BJUtil.getValue=function(f,b){if(b==null){b={}}var g=f;f=$(f);var a=document.getElementsByName(g);if(f==null&&a.length>=1){f=a.item(0)}if(f==null){BJUtil.debug("getValue() can't find an element with id/name: "+g+".");return""}if(BJUtil._isHTMLElement(f,"select")){var e=f.selectedIndex;if(e!=-1){var c=f.options[e].value;if(c==null||c==""){c=f.options[e].text}return c}else{return""}}if(BJUtil._isHTMLElement(f,"input")){if(f.type=="radio"){var d;for(i=0;i<a.length;i++){d=a.item(i);if(d.type=="radio"){if(d.checked){if(a.length>1){return d.value}else{return true}}}}}switch(f.type){case"checkbox":case"check-box":case"radio":return f.checked;default:return f.value}}if(BJUtil._isHTMLElement(f,"textarea")){return f.value}if(b.textContent){if(f.textContent){return f.textContent}else{if(f.innerText){return f.innerText}}}return f.innerHTML};BJUtil.getTextContent=function(a){if(typeof a.textContent!="undefined"){return(a.textContent)}else{if(a.innerText){return(a.innerText)}}};BJUtil.getText=function(b){var c=b;b=$(b);if(b==null){BJUtil.debug("getText() can't find an element with id: "+c+".");return""}if(!BJUtil._isHTMLElement(b,"select")){BJUtil.debug("getText() can only be used with select elements. Attempt to use: "+BJUtil._detailedTypeOf(b)+" from  id: "+c+".");return""}var a=b.selectedIndex;if(a!=-1){return b.options[a].text}else{return""}};BJUtil.setValues=function(b){for(var a in b){if($(a)!=null||document.getElementsByName(a).length>=1){BJUtil.setValue(a,b[a])}}};BJUtil.getValues=function(f){var e;if(typeof f=="string"){e=$(f)}if(BJUtil._isHTMLElement(f)){e=f}if(e!=null){if(e.elements==null){alert("getValues() requires an object or reference to a form element.");return null}var b={};var d;for(var a=0;a<e.elements.length;a++){if(e[a].id!=null){d=e[a].id}else{if(e[a].value!=null){d=e[a].value}else{d="element"+a}}b[d]=BJUtil.getValue(e[a])}return b}else{for(var c in f){if($(c)!=null||document.getElementsByName(c).length>=1){f[c]=BJUtil.getValue(c)}}return f}};BJUtil.addOptions=function(k,e){if(k==null){BJUtil.debug("addOptions() can't find an element with id: "+orig+".");return}var c=BJUtil._isHTMLElement(k,"select");var f=BJUtil._isHTMLElement(k,["ul","ol"]);if(!c&&!f){BJUtil.debug("addOptions() can only be used with select/ul/ol elements. Attempt to use: "+BJUtil._detailedTypeOf(k));return}if(e==null){return}var j;var g;var b;var h;if(BJUtil._isArray(e)){for(var d=0;d<e.length;d++){if(c){if(arguments[2]!=null){if(arguments[3]!=null){j=BJUtil._getValueFrom(e[d],arguments[3]);g=BJUtil._getValueFrom(e[d],arguments[2])}else{g=BJUtil._getValueFrom(e[d],arguments[2]);j=g}}else{j=BJUtil._getValueFrom(e[d],arguments[3]);g=j}if(j||g){b=new Option(j,g);k.options[k.options.length]=b}}else{h=document.createElement("li");g=BJUtil._getValueFrom(e[d],arguments[2]);if(g!=null){h.innerHTML=g;k.appendChild(h)}}}}else{if(arguments[3]!=null){for(var a in e){if(!c){alert("BJUtil.addOptions can only create select lists from objects.");return}g=BJUtil._getValueFrom(e[a],arguments[2]);j=BJUtil._getValueFrom(e[a],arguments[3]);if(j||g){b=new Option(j,g);k.options[k.options.length]=b}}}else{for(var a in e){if(!c){BJUtil.debug("BJUtil.addOptions can only create select lists from objects.");return}if(typeof e[a]=="function"){j=null;g=null}else{if(arguments[2]){j=a;g=e[a]}else{j=e[a];g=a}}if(j||g){b=new Option(j,g);k.options[k.options.length]=b}}}}};BJUtil._getValueFrom=function(a,b){if(b==null){return a}else{if(typeof b=="function"){return b(a)}else{return a[b]}}};BJUtil.removeAllOptions=function(b){var d=b;b=$(b);if(b==null){BJUtil.debug("removeAllOptions() can't find an element with id: "+d+".");return}var a=BJUtil._isHTMLElement(b,"select");var c=BJUtil._isHTMLElement(b,["ul","ol"]);if(!a&&!c){BJUtil.debug("removeAllOptions() can only be used with select, ol and ul elements. Attempt to use: "+BJUtil._detailedTypeOf(b));return}if(a){b.options.length=0}else{while(b.childNodes.length>0){b.removeChild(b.firstChild)}}};BJUtil.addRows=function(e,d,a,b){var h=e;e=$(e);if(e==null){BJUtil.debug("addRows() can't find an element with id: "+h+".");return}if(!BJUtil._isHTMLElement(e,["table","tbody","thead","tfoot"])){BJUtil.debug("addRows() can only be used with table, tbody, thead and tfoot elements. Attempt to use: "+BJUtil._detailedTypeOf(e));return}if(!b){b={}}if(!b.rowCreator){b.rowCreator=BJUtil._defaultRowCreator}if(!b.cellCreator){b.cellCreator=BJUtil._defaultCellCreator}var c,f;if(BJUtil._isArray(d)){for(f=0;f<d.length;f++){b.rowData=d[f];b.rowIndex=f;b.rowNum=f;b.data=null;b.cellNum=-1;c=BJUtil._addRowInner(a,b);if(c!=null){e.appendChild(c)}}}else{if(typeof d=="object"){f=0;for(var g in d){b.rowData=d[g];b.rowIndex=g;b.rowNum=f;b.data=null;b.cellNum=-1;c=BJUtil._addRowInner(a,b);if(c!=null){e.appendChild(c)}f++}}}};BJUtil._addRowInner=function(a,b){var e=b.rowCreator(b);if(e==null){return null}for(var f=0;f<a.length;f++){var d=a[f];var c=d(b.rowData,b);b.data=c;b.cellNum=f;var g=b.cellCreator(b);if(g!=null){if(c!=null){if(BJUtil._isHTMLElement(c)){g.appendChild(c)}else{g.innerHTML=c}}e.appendChild(g)}}return e};BJUtil._defaultRowCreator=function(a){return document.createElement("tr")};BJUtil._defaultCellCreator=function(a){return document.createElement("td")};BJUtil.removeAllRows=function(a){var b=a;a=$(a);if(a==null){BJUtil.debug("removeAllRows() can't find an element with id: "+b+".");return}if(!BJUtil._isHTMLElement(a,["table","tbody","thead","tfoot"])){BJUtil.debug("removeAllRows() can only be used with table, tbody, thead and tfoot elements. Attempt to use: "+BJUtil._detailedTypeOf(a));return}while(a.childNodes.length>0){a.removeChild(a.firstChild)}};BJUtil._isHTMLElement=function(c,e){if(c==null||typeof c!="object"||c.nodeName==null){return false}if(e!=null){var d=c.nodeName.toLowerCase();if(typeof e=="string"){return d==e.toLowerCase()}if(BJUtil._isArray(e)){var a=false;for(var b=0;b<e.length&&!a;b++){if(d==e[b].toLowerCase()){a=true}}return a}BJUtil.debug("BJUtil._isHTMLElement was passed test node name that is neither a string or array of strings");return false}return true};Array.prototype.indexOf=function(c,b){for(var a=this.length,b=b<0?b+a<0?0:b+a:b||0;b<a&&this[b]!==c;b++){}return a<=b?-1:b};BJUtil._detailedTypeOf=function(a){var b=typeof a;if(b=="object"){b=Object.prototype.toString.apply(a);b=b.substring(8,b.length-1)}return b};BJUtil._isArray=function(a){return(a&&a.join)?true:false};BJUtil._isDate=function(a){return(a&&a.toUTCString)?true:false};BJUtil._importNode=function(f,e,b){var d;if(e.nodeType==1){d=f.createElement(e.nodeName);for(var c=0;c<e.attributes.length;c++){var a=e.attributes[c];if(a.nodeValue!=null&&a.nodeValue!=""){d.setAttribute(a.name,a.nodeValue)}}if(typeof e.style!="undefined"){d.style.cssText=e.style.cssText}}else{if(e.nodeType==3){d=f.createTextNode(e.nodeValue)}}if(b&&e.hasChildNodes()){for(c=0;c<e.childNodes.length;c++){d.appendChild(BJUtil._importNode(f,e.childNodes[c],true))}}return d};BJUtil.scrollToElement=function(d){var c=YAHOO.util.Dom.getRegion(d);var e=YAHOO.util.Dom.getClientRegion();var b=YAHOO.util.Dom.getViewportHeight();if(e.contains(c)){}else{var a=(c.bottom-b);scrollTo(0,a)}};BJUtil.debug=function(a){alert(a)};BJUtil.headerMenus=new Object;BJUtil.headerMenus.setIds=function(a){YAHOO.util.Event.onContentReady("MainNav",function(){BJUtil.headerMenus.init(a)});if(false&&YAHOO.env.ua.ie<=8&&YAHOO.env.ua.ie>1){YAHOO.util.Event.onDOMReady(function(){BJUtil.headerMenus.init(a)})}else{}};BJUtil.headerMenus.init=function(menuIds){var menuArray=menuIds.split(",");for(var i=0;i<menuArray.length;i++){var script='YAHOO.util.Event.addListener("'+menuArray[i]+'", "mouseover", function(e){ BJUtil.headerMenus.hover(e,"'+menuArray[i]+'"); });';script+=' YAHOO.util.Event.addListener("'+menuArray[i]+'", "mouseout",  function(e){ BJUtil.headerMenus.blurCheck(e,"'+menuArray[i]+'"); });';script+=' YAHOO.util.Event.addListener("'+menuArray[i]+'Menu", "mouseout",  function(e){ BJUtil.headerMenus.blurCheck(e,"'+menuArray[i]+'"); });';eval(script)}YAHOO.util.Event.onDOMReady(function(){document.body.appendChild(document.getElementById("MainNavMenus"));if(BJUtil.headerMenus.activeHeaderMenusList.length>0){BJUtil.headerMenus.hover(false,BJUtil.headerMenus.activeHeaderMenusList[0],true)}});BJUtil.headerMenus.interval=false};BJUtil.headerMenus.activeHeaderMenusList=new Array();BJUtil.headerMenus.headerMenuObjects=new Object();BJUtil.headerMenus.hover=function(e,menu,force){var tabObj=document.getElementById(menu);if(tabObj.className!="BeigeTab"||force){for(var i=0;i<BJUtil.headerMenus.activeHeaderMenusList.length;i++){BJUtil.headerMenus.blur(BJUtil.headerMenus.activeHeaderMenusList.pop())}BJUtil.headerMenus.activeHeaderMenusList.push(menu);var menuObj=document.getElementById(menu+"Menu");BJUtil.headerMenus.headerMenuObjects[menu]=new Object;BJUtil.headerMenus.headerMenuObjects[menu].tabObj=tabObj;BJUtil.headerMenus.headerMenuObjects[menu].menuObj=menuObj;tabObj.className="BeigeTab";menuObj.style.display="block";var menuContent=YAHOO.util.Dom.getElementsByClassName("MenuContent","div",menuObj)[0];var menuBottom=YAHOO.util.Dom.getElementsByClassName("MenuBottom","div",menuObj)[0];menuContent.style.marginLeft="5px";menuBottom.style.marginLeft=menuContent.style.marginLeft;var xy=YAHOO.util.Dom.getRegion(tabObj);BJUtil.headerMenus.reposition(menuObj,tabObj,xy);var script='YAHOO.util.Event.addListener(document.body, "mousemove", BJUtil.headerMenus.blurCheck, "'+menu+'");';eval(script);var _timeoutId=null;YAHOO.util.Event.on(document.body,"mousemove",function(e){var p=YAHOO.util.Event.getXY(e);clearTimeout(_timeoutId);_timeoutId=setTimeout(function(){},150)});if(BJUtil.headerMenus.interval){clearInterval(BJUtil.headerMenus.interval)}BJUtil.headerMenus.interval=setInterval("BJUtil.headerMenus.timedCheck()",200)}};BJUtil.headerMenus.timedCheck=function(){for(var c=0;c<BJUtil.headerMenus.activeHeaderMenusList.length;c++){var b=(BJUtil.headerMenus.headerMenuObjects[BJUtil.headerMenus.activeHeaderMenusList[c]].tabObj);var d=(BJUtil.headerMenus.headerMenuObjects[BJUtil.headerMenus.activeHeaderMenusList[c]].menuObj);var a=YAHOO.util.Dom.getRegion(b);BJUtil.headerMenus.reposition(d,b,a)}};BJUtil.headerMenus.blur=function(d){if(BJUtil.headerMenus.interval){clearInterval(BJUtil.headerMenus.interval)}var a=document.getElementById(d);var c="";var b=document.getElementById(d+"Menu");b.style.display="none";a.className="";YAHOO.util.Event.removeListener(document.body,"mousemove")};BJUtil.headerMenus.blurCheck=function(g,h){var b=document.getElementById(h);var c=document.getElementById(h+"Menu");var f=YAHOO.util.Event.getXY(g);var a=YAHOO.util.Dom.getRegion(b);BJUtil.headerMenus.reposition(c,b,a);var d=YAHOO.util.Dom.getRegion(c);if(!((f[0]>=a.left&&f[0]<=a.right&&f[1]>=a.top&&f[1]<=a.bottom)||(f[0]>=d.left&&f[0]<=d.right&&f[1]>=d.top&&f[1]<=d.bottom))){BJUtil.headerMenus.blur(h)}};BJUtil.headerMenus.reposition=function(c,b,a){a[1]=Math.ceil(a.bottom);a[0]=Math.ceil(a[0]);YAHOO.util.Dom.setXY(c,a)};BJUtil.gbuttons=new Object;BJUtil.gbuttons.isSetup=false;BJUtil.gbuttons.init=function(b){if(BJUtil.gbuttons.isSetup){return false}var a;if(!b){b=document}a=b.getElementsByTagName("input");for(var c=0;c<a.length;c++){if(a[c].className.indexOf("submit")>-1){YAHOO.util.Event.removeListener(a[c],"mouseover",BJUtil.gbuttons.hover);YAHOO.util.Event.removeListener(a[c],"mouseout",BJUtil.gbuttons.blur);YAHOO.util.Event.addListener(a[c],"mouseover",BJUtil.gbuttons.hover);YAHOO.util.Event.addListener(a[c],"mouseout",BJUtil.gbuttons.blur)}}BJUtil.gbuttons.isSetup=true};BJUtil.gbuttons.hover=function(f,b){var d=this;if(b){d=b}var a=YAHOO.util.Dom.getStyle(d,"backgroundImage");if(a.indexOf("gbutton")>-1&&a.indexOf(".hover")==-1&&a.indexOf(".disabled")==-1){var c=a.replace(".png",".hover.png");d.style.backgroundImage=c}};BJUtil.gbuttons.blur=function(f,b){var d=this;if(b){d=b}var a=YAHOO.util.Dom.getStyle(d,"backgroundImage");if(a.indexOf("gbutton")>-1&&a.indexOf(".hover")>=0&&a.indexOf(".disabled")==-1){var c=a.replace(".hover.png",".png");d.style.backgroundImage=c}};YAHOO.util.Event.onDOMReady(function(){BJUtil.gbuttons.init()});BJUtil.confirmMessage=function(a){return true;if(a=="addWatched"){a="Are you sure you want to add this to your watched bounties?"}else{if(a="removeWatched"){a="Are you sure you want to remove this from your watched bounties?"}}return(window.confirm(a))};BJUtil.OS=new Object;BJUtil.OS.isOSX=function(){ua=navigator.userAgent.toLowerCase();if(navigator.plugins["Default Plugin Carbon.cfm"]||ua.indexOf("omniweb")!=-1||ua.indexOf("os x")!=-1){return true}else{return false}};function getDisplayString(){var a=navigator.appName;if(a=="Microsoft Internet Explorer"){return"block"}return"table-row"}function returnObjById(b){if(document.getElementById){var a=document.getElementById(b)}else{if(document.all){var a=document.all[b]}else{if(document.layers){var a=document.layers[b]}}}return a}function showHideRow(b,a){if(a==true){b.style.display=getDisplayString()}else{b.style.display="none"}}function showHideRowById(b,a){if(a==true){returnObjById(b).style.display=getDisplayString()}else{returnObjById(b).style.display="none"}}function showCompanyIdentity(a){var b=a.value.replace(/^\s+|\s+$/g,"");if(b.length>0){showHideRow(returnObjById("companyIdentity"),true)}else{showHideRow(returnObjById("companyIdentity"),false)}}function validateMoney(b){var a=(b.which)?b.which:b.keyCode;if(a>31&&(a<48||a>57)&&a!=46){return false}return true}function selectCurrency(a,d){var e=document.getElementById(d);for(var c=0,b=e.options.length;c<b;c++){if(e.options[c].value==a){e.selectedIndex=c;break}}}function updateCurrency(c,b){return;var a=document.getElementById(c);var d=a.options[a.selectedIndex].value;if(d=="AB"||d=="BC"||d=="MB"||d=="NB"||d=="NL"||d=="NT"||d=="NS"||d=="NU"||d=="ON"||d=="PE"||d=="QC"||d=="SK"||d=="YT"){selectCurrency("CAD",b)}else{selectCurrency("USD",b)}}function convertMoney(g,a,h){var b="0123456789.";var c=document.getElementById("td-"+a);var m=document.getElementById("amount-"+a).value;var l="";for(var f=0,d=m.length;f<d;f++){if(b.indexOf(m.charAt(f))!=-1){l+=m.charAt(f)}}var k=l*h;c.innerHTML=k.toFixed(2);return true}function validateDisengageNote(a){if(a.value=="(Optional)"){a.value=""}}var Url={encode:function(a){return escape(this._utf8_encode(a))},decode:function(a){return this._utf8_decode(unescape(a))},_utf8_encode:function(b){b=b.replace(/\r\n/g,"\n");var a="";for(var e=0;e<b.length;e++){var d=b.charCodeAt(e);if(d<128){a+=String.fromCharCode(d)}else{if((d>127)&&(d<2048)){a+=String.fromCharCode((d>>6)|192);a+=String.fromCharCode((d&63)|128)}else{a+=String.fromCharCode((d>>12)|224);a+=String.fromCharCode(((d>>6)&63)|128);a+=String.fromCharCode((d&63)|128)}}}return a},_utf8_decode:function(a){var b="";var d=0;var e=c1=c2=0;while(d<a.length){e=a.charCodeAt(d);if(e<128){b+=String.fromCharCode(e);d++}else{if((e>191)&&(e<224)){c2=a.charCodeAt(d+1);b+=String.fromCharCode(((e&31)<<6)|(c2&63));d+=2}else{c2=a.charCodeAt(d+1);c3=a.charCodeAt(d+2);b+=String.fromCharCode(((e&15)<<12)|((c2&63)<<6)|(c3&63));d+=3}}}return b}};function addForceBreak(b){if(/Firefox[\/\s](\d+\.\d+)/.test(navigator.userAgent)){var a=new Number(RegExp.$1);if(a>=3){addShy(b)}else{if(a<3){addWbr(b)}}}else{addShy(b)}}function addWbr(d){var e=/<<wbr \/>\/*[<br>_\s="'\w]+>/g;var a=d.innerHTML;var c=a.split("");var b=c.join("<wbr />");b=b.replace(e,addWbr_reconstructTag);d.innerHTML=b}function addWbr_reconstructTag(a){return a.replace(/<wbr \/>/g,"")}function addShy(d){var e=/<&shy;\/*[<br>_\s="'\w]+>/g;var a=d.innerHTML;var c=a.split("");var b=c.join("&shy;");b=b.replace(e,addWbr_reconstructTag);d.innerHTML=b}function addShy_reconstructTag(a){return a.replace(/&shy;/g,"")}candidatesTableAjax=new Object;candidatesTableAjax.cache=new Object;candidatesTableAjax.loadInactiveViaAjax=function(d){if(typeof candidatesTableAjax.rejectsLoaded=="undefined"||!candidatesTableAjax.rejectsLoaded){if(typeof candidatesTableAjax.cache.initial=="undefined"){var f=document.getElementById("Candidate-Table");candidatesTableAjax.cache.initial=f.innerHTML}var c=document.getElementById("toggleRejects");var h=document.getElementById("toggleRejectsLoading");if(c&&h){c.style.display="none";h.style.display=""}var a="";var e="";if(document.viewCandidatesForm){a=document.viewCandidatesForm}else{if(document.viewPostingForm){a=document.viewPostingForm}}e="&sortOrder="+a.sortOrder.value;if(d=="preservePageAndSearch"){e=e+"&currentPage="+a.currentPage.value+"&searchTerm="+Url.encode(a.searchTerm.value)}var b="";if(document.viewCandidatesForm){supressReviewer="&supressReviewer="+a.supressReviewer.value;if(document.getElementById("reviewerCandidatesTable")){b="/contacts/hiringManagerViewCandidates.do?dispatch=viewCandidatesAjax&showRejects="+(candidatesTableAjax.isShowInactive).toString()+e+supressReviewer}else{b="/contacts/hiringManagerViewCandidates.do?dispatch=viewCandidatesAjax&showRejects="+(candidatesTableAjax.isShowInactive).toString()+e+supressReviewer}}else{if(document.viewPostingForm){b="/posting/viewPosting.do?dispatch=postingCandidatesAjax&postingId="+document.viewPostingForm.postingId.value+"&showRejects="+((candidatesTableAjax.isShowInactive)).toString()+e;if(location.href.indexOf("Enterprise")>2){b=b+"&enterprise=true"}}else{return}}var g=YAHOO.util.Connect.asyncRequest("POST",b,{success:candidatesTableAjax.loadInactiveViaAjax.success,failure:candidatesTableAjax.loadInactiveViaAjax.failure},null)}};candidatesTableAjax.loadInactiveViaAjax.success=function(o){if(o.responseText!==undefined){if(o.responseText.indexOf("<!DOCTYPE")!=-1){window.top.document.write(o.responseText);return}var candidateTableDiv=document.getElementById("Candidate-Table");var responseHTML=String(o.responseText);candidatesTableAjax.cache.fromajax=responseHTML;candidateTableDiv.innerHTML=responseHTML;var d_toggleRejects=document.getElementById("toggleRejects");var d_toggleRejectsLoading=document.getElementById("toggleRejectsLoading");if(d_toggleRejects&&d_toggleRejectsLoading){d_toggleRejects.style.display="";d_toggleRejectsLoading.style.display="none"}candidatesTableAjax.setShowInactiveText();candidatesTableAjax.rejectsLoaded=true;rejectsJavascript=document.getElementById("Candidate-Table-Ajax-Javascript");if(rejectsJavascript){var rejectsJS=(String(rejectsJavascript.innerHTML).replace(/\\'/g,"--_QUOTE_--").replace(new RegExp("'","g"),"&#39;").replace(new RegExp("--_QUOTE_--","g"),"'"));eval(rejectsJS);candidatesTableAjax.cache.initialList=resumeList;resumeList=resumeListAjax;candidatesTableAjax.cache.fromajaxList=resumeList}else{}widgetInit(candidateTableDiv);if(typeof BJUtil.help!="undefined"){BJUtil.help.init()}}};candidatesTableAjax.loadInactiveViaAjax.failure=function(a){if(a.status==302){window.top.location="/"}};candidatesTableAjax.toggleInactive=function(c){if(BJUtil.loggedInPerson.isReviewer==true){var b=document.getElementById("resumePopup");if(b&&b.parentNode&&b.parentNode.removeChild){b.parentNode.removeChild(b)}}var a;if(document.viewCandidatesForm){a=document.viewCandidatesForm}else{if(document.viewPostingForm){a=document.viewPostingForm}}if(typeof candidatesTableAjax.rejectsLoaded=="undefined"||!candidatesTableAjax.rejectsLoaded){if(a&&a.showRejects){if(a.showRejects.value=="false"){candidatesTableAjax.isShowInactive=false}else{candidatesTableAjax.isShowInactive=true}}candidatesTableAjax.initialShowInactive=candidatesTableAjax.isShowInactive;candidatesTableAjax.isShowInactive=!candidatesTableAjax.isShowInactive;candidatesTableAjax.loadInactiveViaAjax(c)}else{candidatesTableAjax.isShowInactive=!candidatesTableAjax.isShowInactive;var d=document.getElementById("Candidate-Table");d.innerHTML="";if(candidatesTableAjax.isShowInactive==candidatesTableAjax.initialShowInactive){d.innerHTML=candidatesTableAjax.cache.initial;resumeList=candidatesTableAjax.cache.initialList}else{d.innerHTML=candidatesTableAjax.cache.fromajax;resumeList=candidatesTableAjax.cache.fromajaxList}widgetInit(d);if(typeof BJUtil.help!="undefined"){BJUtil.help.init()}candidatesTableAjax.setShowInactiveText()}};candidatesTableAjax.isShowInactive=false;candidatesTableAjax.setShowInactiveText=function(){var b=document.getElementById("toggleRejects");var a;if(document.viewCandidatesForm){a=document.viewCandidatesForm}else{if(document.viewPostingForm){a=document.viewPostingForm}}if(candidatesTableAjax.isShowInactive==false){b.firstChild.nodeValue="Show Inactive"}else{b.firstChild.nodeValue="Hide Inactive"}if(a&&a.showRejects){if(candidatesTableAjax.isShowInactive){a.showRejects.value="true"}else{a.showRejects.value="false"}}};candidatesTableAjax.init=function(){var b=document.getElementById("Candidate-Table");var a;if(document.viewCandidatesForm){a=document.viewCandidatesForm}else{if(document.viewPostingForm){a=document.viewPostingForm}}if(a&&a.showRejects){if(a.showRejects.value=="true"){candidatesTableAjax.isShowInactive=true}else{candidatesTableAjax.isShowInactive=false}candidatesTableAjax.setShowInactiveText()}};candidatesTableAjax.requestRefund=new Object;candidatesTableAjax.requestRefund.focus=function(b){var a=document.getElementById("ta-refund-reason-"+b);var c="";if(a&&a.value){c=a.value}if(c.split(" ").join("").split(String.fromCharCode(9)).join("")==""){a.value=""}};candidatesTableAjax.requestRefund.submit=function(e){var j=document.getElementById("ta-refund-lastDay-"+e);var f=document.getElementById("ta-refund-reason-"+e);var c=document.getElementById("ta-refund-"+e);var d=document.getElementById("feedbackbox");if(d){d.innerHTML=""}if(!j||!j.value||j.value==""){if(d){d.innerHTML="<span class='feedbacktext'>The Last Day field is required.<br /></span>";var h="";if(f&&f.value){h=f.value}if(h.split(" ").join("").split(String.fromCharCode(9)).join("")==""){d.innerHTML+="<span class='feedbacktext'>The Reason field is required.<br /></span>"}else{}}return false}else{if(c){c.value=(f.value+"\n\nLast Day:\n "+j.value+"")}}if(String(window.location.pathname).indexOf("contacts")<0){return true}var g=document.getElementById("requestRefundForm-"+e);g.finishedForward.value="hiringManagerFeedbackAjax";YAHOO.util.Connect.setForm(g);var b=YAHOO.util.Connect.asyncRequest("POST",g.action,{success:candidatesTableAjax.requestRefund.success,failure:candidatesTableAjax.requestRefund.failure,argument:{submissionId:e}},null);var a=document.getElementById("requestRefundForm-"+e+"_loadingIcon");if(!a){a=document.createElement("span");a.id="requestRefundForm-"+e+"_loadingIcon";a.innerHTML="<img src='/images/ajax-loader.gif' style='width:16px;height:16px;position:absolute;left:3px;top:1px;' />";a.style.position="relative";g.appendChild(a)}a.style.display="";return false};candidatesTableAjax.requestRefund.success=function(b){var c=document.getElementById("requestRefundForm-"+b.argument.submissionId+"_loadingIcon");if(c){c.style.display="none"}if(b.responseText!==undefined){var a=document.getElementById("feedbackbox");if(a){a.innerHTML=b.responseText}if(b.responseText.indexOf("A refund reason is required")<0){Bounty.widgets.closeWidget("refund"+b.argument.submissionId);Bounty.widgets.closeWidget("ajaxrefund"+b.argument.submissionId);candidatesTableAjax.loadInactiveViaAjax("preservePageAndSearch")}}};candidatesTableAjax.requestRefund.failure=function(a){if(a.status==302){window.top.location="/"}};function logError(a){if(typeof(console)!=="undefined"&&console!=null&&arguments.length){console.log(a+"\n"+document.location.href)}}YAHOO.util.Event.onAvailable("toggleRejects",candidatesTableAjax.init,this);
