function Post(report,url,showResponse){if(report.length==0){report="Please hold..."}if(showResponse.length==0){showResponse="Post_Response"}if(url.length==0){url=window.location.href}else{url=BaseUrl(url)}$("report").innerHTML=report;var allE=Form.serialize($("ajaxform"));var postAjax=new Ajax.Request(url,{method:"post",parameters:allE,onComplete:eval(showResponse)})}function Post_Response(a){$("report").innerHTML="Generic: "+a.responseText}function PostArray(elements,report,url,showResponse){if(report.length==0){report="Please hold..."}$("report").innerHTML=report;url=BaseUrl(url);var postAjax=new Ajax.Request(url,{method:"post",parameters:elements,onComplete:eval(showResponse)})}function Show(a){var b=$("#"+a);b.removeClass("invisible")}function BaseUrl(a){if(window.location.hostname=="localhost"){return"http://"+HostName()+"/Subscene/"+a}else{return"http://"+HostName()+"/"+a}}function HostName(){return window.location.hostname}function EnterKeyHandler(a,b){if(a.keyCode==13){b.submit()}}function confirmSubmit(){var a=confirm("Are you sure you wish to continue?");if(a){return true}else{return false}}function getQuerystring(a){hu=window.location.search.substring(1);gy=hu.split("&");for(i=0;i<gy.length;i++){ft=gy[i].split("=");if(ft[0]==a){return ft[1]}}}function Get_Cookie(c){var d=document.cookie.indexOf(c+"=");var b=d+c.length+1;if((!d)&&(c!=document.cookie.substring(0,c.length))){return null}if(d==-1){return null}var a=document.cookie.indexOf(";",b);if(a==-1){a=document.cookie.length}return unescape(document.cookie.substring(b,a))}function Set_Cookie(f,a,b,c,e,g){var d=f+"="+escape(a)+((b)?";expires="+b.toGMTString(24):"")+((c)?";path="+c:";path=/")+((e)?";domain="+e:"")+((g)?";secure":"");document.cookie=d}function Delete_Cookie(c,b,a){if(Get_Cookie(c)){document.cookie=c+"="+((b)?";path="+b:"")+((a)?";domain="+a:"")+";expires=Thu, 01-Jan-1970 00:00:01 GMT"}};new function(a){var b=a.separator||"&";var f=a.spaces===false?false:true;var g=a.suffix===false?"":"[]";var e=a.prefix===false?false:true;var d=e?a.hash===true?"#":"?":"";var c=a.numbers===false?false:true;jQuery.query=new function(){var i=function(l,m){return l!=undefined&&l!==null&&(!!m?l.constructor==m:true)};var h=function(n){var p,q=/\[([^[]*)\]/g,o=/^(\S+?)(\[\S*\])?$/.exec(n),l=o[1],r=[];while(p=q.exec(o[2])){r.push(p[1])}return[l,r]};var k=function(s,q,l){var n,r=q.shift();if(typeof s!="object"){s=null}if(r===""){if(!s){s=[]}if(i(s,Array)){s.push(q.length==0?l:k(null,q.slice(0),l))}else{if(i(s,Object)){var m=0;while(s[m++]!=null){}s[--m]=q.length==0?l:k(s[m],q.slice(0),l)}else{s=[];s.push(q.length==0?l:k(null,q.slice(0),l))}}}else{if(r&&r.match(/^\s*[0-9]+\s*$/)){var t=parseInt(r,10);if(!s){s=[]}s[t]=q.length==0?l:k(s[t],q.slice(0),l)}else{if(r){var t=r.replace(/^\s*|\s*$/g,"");if(!s){s={}}if(i(s,Array)){var p={};for(var m=0;m<s.length;++m){p[m]=s[m]}s=p}s[t]=q.length==0?l:k(s[t],q.slice(0),l)}else{return l}}}return s};var j=function(l){var m=this;m.keys={};if(l.queryObject){jQuery.each(l.get(),function(n,o){m.SET(n,o)})}else{jQuery.each(arguments,function(){var n=""+this;n=n.replace(/^[?#]/,"");n=n.replace(/[;&]$/,"");if(f){n=n.replace(/[+]/g," ")}jQuery.each(n.split(/[&;]/),function(){var o=decodeURIComponent(this.split("=")[0]);var p=decodeURIComponent(this.split("=")[1]);if(!o){return}if(c){if(/^[+-]?[0-9]+\.[0-9]*$/.test(p)){p=parseFloat(p)}else{if(/^[+-]?[0-9]+$/.test(p)){p=parseInt(p,10)}}}p=(!p&&p!==0)?true:p;if(p!==false&&p!==true&&typeof p!="number"){p=p}m.SET(o,p)})})}return m};j.prototype={queryObject:true,has:function(n,m){var l=this.get(n);return i(l,m)},GET:function(p){if(!i(p)){return this.keys}var o=h(p),n=o[0],m=o[1];var l=this.keys[n];while(l!=null&&m.length!=0){l=l[m.shift()]}return typeof l=="number"?l:l||""},get:function(l){var m=this.GET(l);if(i(m,Object)){return jQuery.extend(true,{},m)}else{if(i(m,Array)){return m.slice(0)}}return m},SET:function(q,n){var l=!i(n)?null:n;var r=h(q),m=r[0],p=r[1];var o=this.keys[m];this.keys[m]=k(o,p.slice(0),l);return this},set:function(l,m){return this.copy().SET(l,m)},REMOVE:function(l){return this.SET(l,null).COMPACT()},remove:function(l){return this.copy().REMOVE(l)},EMPTY:function(){var l=this;jQuery.each(l.keys,function(m,n){delete l.keys[m]});return l},load:function(l){var n=l.replace(/^.*?[#](.+?)(?:\?.+)?$/,"$1");var m=l.replace(/^.*?[?](.+?)(?:#.+)?$/,"$1");return new j(l.length==m.length?"":m,l.length==n.length?"":n)},empty:function(){return this.copy().EMPTY()},copy:function(){return new j(this)},COMPACT:function(){function l(m){var o=typeof m=="object"?i(m,Array)?[]:{}:m;if(typeof m=="object"){function n(p,r,q){if(i(p,Array)){p.push(q)}else{p[r]=q}}jQuery.each(m,function(p,q){if(!i(q)){return true}n(o,p,l(q))})}return o}this.keys=l(this.keys);return this},compact:function(){return this.copy().COMPACT()},toString:function(){var l=0,q=[],o=[],m=this;var n=function(r,u,s){if(!i(s)||s===false){return}var t=[encodeURIComponent(u)];if(s!==true){t.push("=");t.push(encodeURIComponent(s))}r.push(t.join(""))};var p=function(t,s){var r=function(u){return !s||s==""?[u].join(""):[s,"[",u,"]"].join("")};jQuery.each(t,function(u,v){if(typeof v=="object"){p(v,r(u))}else{n(o,r(u),v)}})};p(this.keys);if(o.length>0){q.push(d)}q.push(o.join(b));return q.join("")}};return new j(location.search,location.hash)}}(jQuery.query||{});new function(a){var b=a.separator||"&";var f=a.spaces===false?false:true;var g=a.suffix===false?"":"[]";var e=a.prefix===false?false:true;var d=e?a.hash===true?"#":"?":"";var c=a.numbers===false?false:true;jQuery.query=new function(){var i=function(l,m){return l!=undefined&&l!==null&&(!!m?l.constructor==m:true)};var h=function(n){var p,q=/\[([^[]*)\]/g,o=/^(\S+?)(\[\S*\])?$/.exec(n),l=o[1],r=[];while(p=q.exec(o[2])){r.push(p[1])}return[l,r]};var k=function(s,q,l){var n,r=q.shift();if(typeof s!="object"){s=null}if(r===""){if(!s){s=[]}if(i(s,Array)){s.push(q.length==0?l:k(null,q.slice(0),l))}else{if(i(s,Object)){var m=0;while(s[m++]!=null){}s[--m]=q.length==0?l:k(s[m],q.slice(0),l)}else{s=[];s.push(q.length==0?l:k(null,q.slice(0),l))}}}else{if(r&&r.match(/^\s*[0-9]+\s*$/)){var t=parseInt(r,10);if(!s){s=[]}s[t]=q.length==0?l:k(s[t],q.slice(0),l)}else{if(r){var t=r.replace(/^\s*|\s*$/g,"");if(!s){s={}}if(i(s,Array)){var p={};for(var m=0;m<s.length;++m){p[m]=s[m]}s=p}s[t]=q.length==0?l:k(s[t],q.slice(0),l)}else{return l}}}return s};var j=function(l){var m=this;m.keys={};if(l.queryObject){jQuery.each(l.get(),function(n,o){m.SET(n,o)})}else{jQuery.each(arguments,function(){var n=""+this;n=n.replace(/^[?#]/,"");n=n.replace(/[;&]$/,"");if(f){n=n.replace(/[+]/g," ")}jQuery.each(n.split(/[&;]/),function(){var o=decodeURIComponent(this.split("=")[0]);var p=decodeURIComponent(this.split("=")[1]);if(!o){return}if(c){if(/^[+-]?[0-9]+\.[0-9]*$/.test(p)){p=parseFloat(p)}else{if(/^[+-]?[0-9]+$/.test(p)){p=parseInt(p,10)}}}p=(!p&&p!==0)?true:p;if(p!==false&&p!==true&&typeof p!="number"){p=p}m.SET(o,p)})})}return m};j.prototype={queryObject:true,has:function(n,m){var l=this.get(n);return i(l,m)},GET:function(p){if(!i(p)){return this.keys}var o=h(p),n=o[0],m=o[1];var l=this.keys[n];while(l!=null&&m.length!=0){l=l[m.shift()]}return typeof l=="number"?l:l||""},get:function(l){var m=this.GET(l);if(i(m,Object)){return jQuery.extend(true,{},m)}else{if(i(m,Array)){return m.slice(0)}}return m},SET:function(q,n){var l=!i(n)?null:n;var r=h(q),m=r[0],p=r[1];var o=this.keys[m];this.keys[m]=k(o,p.slice(0),l);return this},set:function(l,m){return this.copy().SET(l,m)},REMOVE:function(l){return this.SET(l,null).COMPACT()},remove:function(l){return this.copy().REMOVE(l)},EMPTY:function(){var l=this;jQuery.each(l.keys,function(m,n){delete l.keys[m]});return l},load:function(l){var n=l.replace(/^.*?[#](.+?)(?:\?.+)?$/,"$1");var m=l.replace(/^.*?[?](.+?)(?:#.+)?$/,"$1");return new j(l.length==m.length?"":m,l.length==n.length?"":n)},empty:function(){return this.copy().EMPTY()},copy:function(){return new j(this)},COMPACT:function(){function l(m){var o=typeof m=="object"?i(m,Array)?[]:{}:m;if(typeof m=="object"){function n(p,r,q){if(i(p,Array)){p.push(q)}else{p[r]=q}}jQuery.each(m,function(p,q){if(!i(q)){return true}n(o,p,l(q))})}return o}this.keys=l(this.keys);return this},compact:function(){return this.copy().COMPACT()},toString:function(){var l=0,q=[],o=[],m=this;var n=function(r,u,s){if(!i(s)||s===false){return}var t=[encodeURIComponent(u)];if(s!==true){t.push("=");t.push(encodeURIComponent(s))}r.push(t.join(""))};var p=function(t,s){var r=function(u){return !s||s==""?[u].join(""):[s,"[",u,"]"].join("")};jQuery.each(t,function(u,v){if(typeof v=="object"){p(v,r(u))}else{n(o,r(u),v)}})};p(this.keys);if(o.length>0){q.push(d)}q.push(o.join(b));return q.join("")}};return new j(location.search,location.hash)}}(jQuery.query||{});(function(a){a.fn.extend({asp:function(b){return a("#"+iname+this.selector)}})})(jQuery);function Qreply(a){if($F("CanUserPost")=="false"){return parent.location.href=BaseUrl("Forums/AddPost.aspx?PostID="+a)}wrapper=$("q"+a);content=$("qReplyForm");pb=$("PostBody");wrapper.appendChild(content);Element.show(content);$("report").innerHTML="";pb.value="";pb.focus();$("ReplyToPostId").value=a;$("AdvancedPost").href=BaseUrl($("AdvancedPost").name.replace("{0}",a))}function PostQreply(a){if($F("PostBody").length<1){$("report").innerHTML="Reply cannot be empty!";return}var b="PostBody="+$F("PostBody")+"&ReplyToPostId="+$F("ReplyToPostId");PostArray(b,a,"CsExtension/Ajax/PostQuickReply.aspx","PostQreply_Response")}function PostQreply_Response(a){response=a.responseText;if(response.substring(0,6)=="Error:"){$("report").innerHTML=response}else{content_response=$("qReplyForm_Response");var b=document.createElement("div");b.innerHTML=content_response.innerHTML.replace("{0}",$F("PostBody").substring(0,12));content.parentNode.appendChild(b);Element.show(b);Element.hide($("qReplyForm"));if(Get_Cookie("AutoRefresh")=="true"){refresh()}}}function AutoRefresh(a){if(a.checked){Set_Cookie("AutoRefresh","true")}else{Set_Cookie("AutoRefresh","false")}}function MoreO(a){moreOptions=$("o"+a);Element.show(moreOptions)}function DropDownGoTo(a){menu=$("dropdownmenu"+a);parent.location.href=BaseUrl("forums/"+menu.options[menu.selectedIndex].value+"/ShowForum.aspx")}function DropDownMinus(a,b){menu=$("dropdownmenu"+a);index=FindPrev(menu,menu.selectedIndex);if(b=="true"){Element.addClassName(menu,"hover")}else{Element.removeClassName(menu,"hover")}if(index>0){menu.selectedIndex=index}else{menu.selectedIndex=FindPrev(menu,menu.length)}}function DropDownPlus(a,b){menu=$("dropdownmenu"+a);index=FindNext(menu,menu.selectedIndex);if(b=="true"){Element.addClassName(menu,"hover")}else{Element.removeClassName(menu,"hover")}if(index<=(menu.length-1)){menu.selectedIndex=index}else{menu.selectedIndex=FindNext(menu,0)}}function FindNext(b,a){do{a++}while((b.options[a]!=null)&&(b.options[a].value=="")&&(a<(b.length-1)));return a}function FindPrev(b,a){do{a--}while((b.options[a]!=null)&&(b.options[a].value=="")&&(a>0));return a}function goToForumSearch(){str=$("ForumSearch");if(str.value==""){str.focus()}else{parent.location.href=BaseUrl("search/SearchResults.aspx")+"?q="+escape(str.value)}}function EnterKeySearchHandler(a){if(a.keyCode==13){goToForumSearch()}};function AddBid(){report=$("report");credits=$F("credits");quoteId=$F("quoteId");var a="credits="+credits+"&quoteId="+quoteId;PostArray(a,"","Bid/Ajax/AddBid.aspx","AddBid_Response")}function AddBid_Response(a){response=a.responseText;if(response.substring(0,6)=="Error:"){$("report").innerHTML="<span class=alert>"+response+"</span>"}else{$("report").innerHTML=response}};function ShowDescription(b,a,c){if(a==null){a=$("#"+c)}var d=$("#descriptionHolder");if(b=="true"){d.toggle()}var a=$("#"+$(a).attr("id")+" option:selected");var e=$("#description"+a.val());$(d).html(a.text()+": "+e.html())}function toggleJobFilter(){var a=$("#jobFilter");var b=$("#jobFilterForm");b.toggle();if(a.hasClass("open")){a.removeClass("open")}else{a.addClass("open")}}function PlaceBid(){if($F("credits")!=""){$("confirmBid").show();$("report").innerHTML="";$("bidButton").value=$F("confirmBidText").replace("{0}",$F("credits"))}else{$("credits").focus()}}function PlaceBidOnEnter(a){if(a.keyCode==13){PlaceBid()}}function GotoPlaceBid(){$("credits").value=$F("gotocredits");PlaceBid();document.location.href=document.location.href+"#placeBid"}function GotoPlaceBidOnEnter(a){if(a.keyCode==13){GotoPlaceBid()}}function TakeAction(a){elements=a.ancestors();elements[2].toggleClassName("menuShow")}function SubmitSearchForm(){document.location.href="/jobs/search.aspx?title="+escape($("#title").val())}function SearchFormKeyHandler(a){if(a.keyCode==13){SubmitSearchForm()}};