function highlight_map(c,a){var b=document.getElementById("area_highlight");if(!a){b.className="sprite-background sprite-state_"+c}else{b.className=""}return true}function show_state(b,a){if(!a){document.getElementById("state_"+b).style.display="block";document.getElementById("state_"+b).className="show_state_name"}else{document.getElementById("state_"+b).style.display="none"}return true}var newWin;function newsPopUp(a){newWin=window.open(a,"_blank"," width=800, height="+Math.round(window.screen.availHeight*0.8)+", scrollbars=yes, screenX = 0, screenY = 0, top = 0, left = 0");newWin.focus();return false}function startpage_ff(){document.getElementById("startpage_ff").style.display="none";document.getElementById("startpage_ff_info").style.display="block";startpage_set()}function startpage_cookie_get(){var a=document.cookie.split("; ");for(i=0;i<a.length;i++){if(a[i]=="b_sp=1"){return true}}return false}function startpage_set(){var a=new Date();a.setTime(a.getTime()+1000*60*60*24*365);a=a.toGMTString();document.cookie="b_sp=1; expires="+a+";";ajax_request("/redir?s=startpage_click&nc=1",null,startpage_callback,null,true,"GET");document.getElementById("startpage_ie").style.display="none"}function startpage_callback(a,b,c){}function startpage_ff_info_close(){document.getElementById("startpage_ff_info").style.display="none"}function startpage_set_default_ca(a,b){setCookie("default_ca",a,365,"/",b,false);return true}var last_clicked_at=0;var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",isBase64:function(a){if((a.length%4)!=0){return false}if(a.split(",")||a.split(".")||a.split("%")){return false}return true},encode:function(c){var a="";var k,h,f,j,g,e,d;var b=0;c=Base64._utf8_encode(c);while(b<c.length){k=c.charCodeAt(b++);h=c.charCodeAt(b++);f=c.charCodeAt(b++);j=k>>2;g=((k&3)<<4)|(h>>4);e=((h&15)<<2)|(f>>6);d=f&63;if(isNaN(h)){e=d=64}else{if(isNaN(f)){d=64}}a=a+this._keyStr.charAt(j)+this._keyStr.charAt(g)+this._keyStr.charAt(e)+this._keyStr.charAt(d)}return a},decode:function(c){var a="";var k,h,f;var j,g,e,d;var b=0;c=c.replace(/[^A-Za-z0-9\+\/\=]/g,"");while(b<c.length){j=this._keyStr.indexOf(c.charAt(b++));g=this._keyStr.indexOf(c.charAt(b++));e=this._keyStr.indexOf(c.charAt(b++));d=this._keyStr.indexOf(c.charAt(b++));k=(j<<2)|(g>>4);h=((g&15)<<4)|(e>>2);f=((e&3)<<6)|d;a=a+String.fromCharCode(k);if(e!=64){a=a+String.fromCharCode(h)}if(d!=64){a=a+String.fromCharCode(f)}}a=Base64._utf8_decode(a);return 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}}}}};function compare_version(b,a){if(typeof(b)=="string"){b=b.split(".")}else{if(typeof(b)=="number"){b=[b]}}if(typeof(a)=="string"){a=a.split(".")}else{if(typeof(a)=="number"){a=[a]}}var c=0;while(1){if(!b[c]){if(!a[c]){return 0}else{return 1}}else{if(!a[c]){return -1}}if(parseInt(b[c])>parseInt(a[c])){return -1}else{if(parseInt(b[c])<parseInt(a[c])){return 1}}c++}}var BrowserDetect={init:function(){this.browser=this.searchString(this.dataBrowser)||"An unknown browser";this.version=this.searchVersion(navigator.userAgent)||this.searchVersion(navigator.appVersion)||"an unknown version";this.OS=this.searchString(this.dataOS)||"an unknown OS"},searchString:function(d){for(var a=0;a<d.length;a++){var b=d[a].string;var c=d[a].prop;this.versionSearchString=d[a].versionSearch||d[a].identity;if(b){if(b.indexOf(d[a].subString)!=-1){return d[a].identity}}else{if(c){return d[a].identity}}}},searchVersion:function(c){var b=c.indexOf(this.versionSearchString);if(b==-1){return}var a=c.substring(b+this.versionSearchString.length+1);if(a.indexOf(" ")>0){a=a.substring(0,a.indexOf(" "))}return a},isValid:function(a){var b=0;var c=false;for(b=0;b<a.length;b++){if(a[b].agent==this.browser){if(compare_version(a[b].version,this.version)>=0){c=true;break}}}return c},dataBrowser:[{string:navigator.userAgent,subString:"OmniWeb",versionSearch:"OmniWeb/",identity:"OmniWeb"},{string:navigator.vendor,subString:"Apple",identity:"Safari"},{prop:window.opera,identity:"Opera"},{prop:window.clientInformation,identity:"Chrome"},{string:navigator.vendor,subString:"iCab",identity:"iCab"},{string:navigator.vendor,subString:"KDE",identity:"Konqueror"},{string:navigator.userAgent,subString:"Firefox",identity:"Firefox"},{string:navigator.vendor,subString:"Camino",identity:"Camino"},{string:navigator.userAgent,subString:"Netscape",identity:"Netscape"},{string:navigator.userAgent,subString:"MSIE",identity:"Explorer",versionSearch:"MSIE"},{string:navigator.userAgent,subString:"Gecko",identity:"Mozilla",versionSearch:"rv"},{string:navigator.userAgent,subString:"Mozilla",identity:"Netscape",versionSearch:"Mozilla"}],dataOS:[{string:navigator.platform,subString:"Win",identity:"Windows"},{string:navigator.platform,subString:"Mac",identity:"Mac"},{string:navigator.platform,subString:"Linux",identity:"Linux"}]};BrowserDetect.init();function PageQuery(b){if(b.length>1){this.q=b.substring(1,b.length)}else{this.q=null}this.keyValuePairs=new Array();if(b){for(var a=0;a<this.q.split("&").length;a++){this.keyValuePairs[a]=this.q.split("&")[a]}}this.getKeyValuePairs=function(){return this.keyValuePairs};this.getValue=function(d){for(var c=0;c<this.keyValuePairs.length;c++){if(this.keyValuePairs[c].split("=")[0]==d){return this.keyValuePairs[c].split("=")[1]}}return -1};this.getParameters=function(){var c=new Array(this.getLength());for(var d=0;d<this.keyValuePairs.length;d++){c[d]=this.keyValuePairs[d].split("=")[0]}return c};this.getLength=function(){return this.keyValuePairs.length}}function queryString(a){var b=new PageQuery(window.location.search);return unescape(b.getValue(a))}function isInArray(b,c){if(!c||c.length==0){return false}for(var a in c){if(c[a].split(":")[0]==b){return true}}return false}function setCookie(c,e,a,h,d,g){var b=new Date();b.setTime(b.getTime());if(a){a=a*1000*60*60*24}var f=new Date(b.getTime()+(a));document.cookie=c+"="+escape(e)+((a)?";expires="+f.toGMTString():"")+((h)?";path="+h:"")+((d)?";domain="+d:"")+((g)?";secure":"")}function getCookie(c){var d=document.cookie.indexOf(c+"=");var a=d+c.length+1;if(!d&&c!=document.cookie.substring(0,c.length)){return null}if(d==-1){return null}var b=document.cookie.indexOf(";",a);if(b==-1){b=document.cookie.length}return unescape(document.cookie.substring(a,b))}function deleteCookie(a,c,b){if(getCookie(a)){document.cookie=a+"="+((c)?";path="+c:"")+((b)?";domain="+b:"")+";expires=Thu, 01-Jan-1970 00:00:01 GMT"}}function setFeatureVal(c,f){var b=typeof(f)=="string"?getElementById(f):f;var g=getCookie("features");var a=b.length;if(g&&g.indexOf(c)>=0){var e=parseInt(g.substr(g.indexOf(c+":")+c.length+1));for(var d=0;d<a;d++){if(e==b.options[d].value){b.options[d].selected=true}}}}function setRadioVal(){var c=getCookie("features");if(c&&c.indexOf("st")>=0){var b=c.substr(c.indexOf("st:")+3);for(var a=0;a<document.f.st.length;a++){if(document.f.st[a].value==b){document.f.st[a].checked=true}}}}function getAdTypeFromCaller(){var c;if(queryString("ca")<0){c="s"}else{var a=queryString("ca");var b=a.split("_");c=b[b.length-1]}return c}function showField(){var a=document.getElementById(showField.arguments[0]);if(a){a.style.display=showField.arguments[1]}if(showField.arguments.length==3){a.innerHTML=showField.arguments[2]}}function showElement(d,c,a){var b=document.getElementById(d);if(b){b.style.display=c==true?"block":"none"}if(a!=null){return a}}function scrollToTop(){window.scrollTo(0,0)}function scrollToBottom(){window.scrollTo(0,10000)}function scrollToObject(a){var c=0;var b=0;while(a){c+=a.offsetLeft;b+=a.offsetTop;a=a.offsetParent}if(typeof(document.body.leftMargin)!="undefined"){c+=document.body.leftMargin;b+=document.body.topMargin}window.scrollTo(0,b)}var focused=false;function scrollToError(b){if(focused){return}var a=document.getElementById(b);scrollToObject(a);if(document.getElementById(b)){document.getElementById(b).focus()}focused=true}function setFocus(a){var b=document.getElementById(a);if(b&&b.type!="hidden"){document.getElementById(a).focus()}}function setChecked(b,c){var a=document.getElementById(b);if(a==null){return}a.checked=c}function setValue(b,c){var a=typeof(b)=="string"?document.getElementById(b):b;if(a==null){return}a.value=c}var newWin;function popUp(c,a,b){newWin=window.open(c,a,b);newWin.focus();return false}function newsPopUp(a){newWin=window.open(a,"_blank"," width=800, height="+Math.round(window.screen.availHeight*0.8)+", scrollbars=yes, screenX = 0, screenY = 0, top = 0, left = 0");newWin.focus();return false}function tableRowHilite(){if(document.getElementById("hl")==null){return}var b=document.getElementById("hl");var c=b.getElementsByTagName("tr");for(var a=0;a<c.length;a++){c[a].onmouseover=function(){this.className+="hilite"};c[a].onmouseout=function(){this.className=this.className.replace("hilite","")}}}function enable_field(a){var b=typeof(a)=="string"?document.getElementById(a):a;if(b==null){return}if(b.disabled){b.disabled=false}}function disable_field(a){var b=typeof(a)=="string"?document.getElementById(a):a;if(b==null){return}if(!b.disabled){b.disabled=true}}function check_dc(b){var a=new Date;var c=a.getTime();if((last_clicked_at+2500)>=c){document.getElementById(b).value=1}else{document.getElementById(b).value=0}last_clicked_at=c}function maxlength(h,g,c){if(!h){h=window.event}if(h.which){var b=h.which;var j=false}else{var b=h.keyCode;var j=true}x=g.value.length;if(x>c){g.value=g.value.substr(0,c);x=c}if(b==0&&j){var d=document.selection.createRange();var a=c-x+d.text.length;var f=window.clipboardData.getData("Text").substr(0,a);d.text=f}else{if(x==c&&(b!=8&&b!=46)){return false}}return true}function findPosX(c,a){var d=0;var b=c.clientWidth;if(c.offsetParent){while(c.offsetParent){d+=c.offsetLeft;c=c.offsetParent}}else{if(c.x){d+=c.x}}return d+(a?b:0)}function findPosY(d,b){var c=0;var a=d.clientHeight;if(d.offsetParent){while(d.offsetParent){c+=d.offsetTop;d=d.offsetParent}}else{if(d.y){c+=d.y}}return c+(b?a:0)}function ProgressBar(d){this.progress=[];this.container=d||"progressbar_container";this.completed=false;this.ESTIMATE_MIN_PROGRESS=10;this.SPEED_CALC_LATEST=30;this.clear();var b=document.getElementById(this.container);if(!b){return}var e=document.createElement("div");e.className="progress_bar";var a=document.createElement("div");a.className="progress_blue";a.style.width="0px";var c=document.createElement("div");c.className="progress_debug";c.id="progress_debug_id";e.appendChild(a);b.appendChild(e);b.appendChild(c);b.appendChild(document.createElement("br"))}ProgressBar.prototype.clear=function(){this.progress=[];var a=document.getElementById(this.container);if(!a){return}while(a.childNodes.length>0){a.removeChild(a.childNodes[0])}};ProgressBar.prototype.update=function(a,b){if(this.completed){return}var d=this.progress.length;var c=new Date();this.progress[d]={progress:a,total:b,time:c.getTime()};this.completed=a==b};ProgressBar.prototype.current=function(){var a=this.progress.length;if(a==0){return}return this.progress[a-1]};ProgressBar.prototype.procent=function(b){var a=this.progress[b]||this.current();if(a&&a.progress){return Math.round(a.progress/a.total*100)}return 0};ProgressBar.prototype.speed=function(){if(this.progress.length==0){return}var a=this.progress.length-Math.floor(this.progress.length*this.SPEED_CALC_LATEST/100)-1;if(a<0){a=0}var e=this.progress[a];var d=this.current();var b=d.progress-e.progress;var c=(d.time-e.time);return(b/c)};ProgressBar.prototype.estimate=function(){if(this.procent()<this.ESTIMATE_MIN_PROGRESS){return}var d=this.speed();var c=this.current();var b=c.total-c.progress;var a=Math.round(b/d);return a};ProgressBar.prototype.draw=function(){var c=document.getElementById(this.container);if(!c){return}c.style.display="block";var g=this.estimate()/1000;var d=this.speed();var h=this.procent();if(c.childNodes.length){var k=c.getElementsByTagName("div")[0];var e=c.getElementsByTagName("div")[1];e.style.width=Math.round((k.offsetWidth-2)*h/100)+"px";var b=c.getElementsByTagName("div")[2];var a=Math.floor(g/60);var j=Math.round(g-a*60);var f="";if(a+j>0){f=js_info.TIME_LEFT+": "}if(a>0){f+=a+" min "}if(j>0){f+=j+" s"}b.innerHTML=h+"%&nbsp;&nbsp;&nbsp;"+f}};ProgressBar.prototype.update_draw=function(a,b){if(this.completed){return}this.update(a,b);this.draw()};function progressBar(a){document.write('<div id="loading" class="progressBar">'+a+'<span id="loading_dots"></span></div>')}function startProgressBar(d){var c=document.getElementById("loading");var b="";d%=4;for(var a=0;a<d;a++){b+="."}document.getElementById("loading_dots").innerHTML=b;d++;c.timer=setTimeout("startProgressBar("+d+")",500)}function showProgressBar(a,b,d){var c=document.getElementById("loading");if(!b){b=0}if(!d){d=20}startProgressBar(1);c.style.top=""+(findPosY(a,true)+b)+"px";c.style.left=""+(findPosX(a,true)+d)+"px";c.style.display="inline"}function hideProgressBar(){var a=document.getElementById("loading");clearTimeout(a.timer);a.style.display="none"}function select_all_weeks(_name,_form,_select){for(var i=1;i<53;i++){var week=eval("document."+_form+"."+_name+i);week.checked=_select}}function fix_next_image(){var b=new Image;var a=new Date().getTime()+Math.random();b.src="/img/none.gif?"+a}fix_next_image();function waitForNextImage(c,a){var a=a?a:"";var b=document.getElementById("display_image"+a).firstChild;if(c.width>0){b.width=c.width;b.height=c.height}else{setTimeout(function(){waitForNextImage(c,a)},100)}}function resizeImage(d,c,e,a){if(!e){e=new Image;e.src=c}if(e.width==0){e.onload=setTimeout(function(){resizeImage(d,c,e,a)},0);return}d.src=e.src;if(a&&e.width>400){var b=(e.width-400)/e.width;d.height=e.height*(1-b);d.width=400}else{d.width=e.width;d.height=e.height}}function showLargeImage(d,b,a){var b=b?b:"";var a=a?a:false;var e=document.getElementById("display_image"+b).firstChild;if(a){resizeImage(e,d,null,a)}else{var c=$("#display_image"+b+" img:first-child");c.attr("src","/img/wait.gif");c.fadeOut(200,function(){c.attr("src",d)}).fadeIn(200)}}function flowplayer_conf(a,d,e,g){var c=new Object();var g=g?g:false;c.showLoopButton=false;c.showMenu=false;c.autoPlay=false;c.loop=false;c.initialScale="scale";c.showFullScreenButton=false;c.useNativeFullScreen=false;c.bufferLength=10;c.videoFile=a;if(e){c.autoBuffering=true}else{if(d&&a.indexOf("videos")>0){var b="";if(g==false){b=a.replace(/.*videos/,d).replace(/flv/,"jpg")}else{var f=a.substring(a.lastIndexOf("/"));f=f.replace(/flv/,"jpg");b=g+f.substring(0,3)+f}c.autoBuffering=false;c.splashImageFile=b;c.scaleSplash=true}else{if(d&&a.indexOf("flush")>0){var b=a.replace(/flv/,"splash");c.splashImageFile=b+"/.jpg";c.scaleSplash=true}}}return c}function flowplayer_conf_to_string(a){var c="{";for(var b in a){c+=b+":"+(typeof(a[b])=="string"?"'":"")+a[b]+(typeof(a[b])=="string"?"'":"");c+=","}c=c.substring(0,c.length-1);c+="}";return c}function hide_video(a){a=a||"";var c=document.getElementById("flowplayerholder"+a);var d=document.getElementById("display_image"+a);if(c){c.style.display="none";var b=c.parentNode;b.removeChild(c)}if(d){d.style.display="block"}}function show_video(k,d,l,f){f=f||"";var g=document.getElementById("display_image"+f);var b=g.parentNode;var c=document.getElementById("flowplayerholder"+f);var h=flowplayer_conf(k,false);h.autoPlay=true;h=flowplayer_conf_to_string(h);if(f&&d>400){l=Math.round(400/d*l);d=400}if(!c){c=document.createElement("div");c.id="flowplayerholder"+f;b.appendChild(c);g.style.display="none";var j={movie:"/swf/FlowPlayer.swf",width:d,height:l,majorversion:"7",build:"0",allowscriptaccess:"always",flashvars:"config="+h};UFO.create(j,"flowplayerholder"+f)}else{if(c.style.display=="none"){g.style.display="none";c.style.display="block"}else{var j=document.getElementById("flowplayerholder"+f+"_obj");var e=j.getTime();var a=j.getDuration();if(e>=a){j.Seek(0)}if(!j.getIsPaused()&&j.getIsPlaying()){j.Pause()}else{j.DoPlay()}}}}function next_image(b){if(!images[counter]){counter=0;reset_scroll();return false}var a=document.getElementById("thumb"+counter);var c=new Image;c.src=image_url+images[counter];if((counter%scroll_images_visible)==0&&b==1&&counter!=0){scroll_right(images.length,1)}showLargeImage(image_url+images[counter]);thumbnailBorder(a,images.length);set_alt_title("main_pict");counter++}function reset_scroll(){var a=images.length;for(i=0;i<a;i++){if(i<scroll_images_visible){document.getElementById("thumb"+i).className=" "}else{document.getElementById("thumb"+i).className="hidden "}}showLargeImage(image_url+images[0]);thumbnailBorder(document.getElementById("thumb0"),a);document.getElementById("arrow_left").style.display="none";document.getElementById("arrow_right").style.display="inline";counter=1}function set_alt_title(c){var a=document.getElementById("main_image");var b=0;if(c=="thumb"){b=1}if(video_exist==1&&counter==images.length-1+b){a.alt=js_info.SHOW_AD_VIDEO;a.title=js_info.SHOW_AD_VIDEO}else{a.alt=js_info.CLICK_FOR_NEXT_IMAGE;a.title=js_info.CLICK_FOR_NEXT_IMAGE}}function thumbnailBorder(b,d,a){var a=a?a:"";if(!b){return}for(i=0;i<d;i++){var c=document.getElementById("thumb"+i+a);if(c.className.match(/selected/)){if(c.className.match(/hidden/)){c.className="hidden"}else{c.className=""}}if(b.id==c.id){c.className="selected"}}}function scroll_right(f,c){var b=f+1;for(i=0;i<f;i++){var e=document.getElementById("thumb"+i);var d=e.className;if(!d.match(/hidden/)){b=i;e.className="hidden"}else{if(i>b&&i<b+(scroll_images_visible+1)){e.className=" "}}}if(b>=f-(scroll_images_visible+1)){document.getElementById("arrow_right").style.display="none";document.getElementById("arrow_left").style.display="inline"}else{document.getElementById("arrow_right").style.display="inline";document.getElementById("arrow_left").style.display="inline"}if(c!=1){var a=b+1;counter=a+1;showLargeImage(image_url+images[a]);document.getElementById("thumb"+a).className="selected"}}function scroll_left(e){var a=0;var b=0;for(i=e-1;i>=0;i--){var d=document.getElementById("thumb"+i);var c=d.className;if(!c.match(/hidden/)){a=i;d.className="hidden"}else{if(i<a&&i>a-(scroll_images_visible+1)){d.className=" ";b=i}}}if(a<7){document.getElementById("arrow_left").style.display="none";document.getElementById("arrow_right").style.display="inline"}else{document.getElementById("arrow_left").style.display="inline";document.getElementById("arrow_right").style.display="inline"}counter=b+1;showLargeImage(image_url+images[b]);document.getElementById("thumb"+b).className=" selected"}function delete_image(a,e,b){var d=document.getElementById(a);var c=document.getElementById(e);showField(d.id,"block");c.innerHTML="<input type='hidden' name='"+b+"' value='1'>";return false}function getElementsByClassName(b,f,a){var e=(f=="*"&&b.all)?b.all:b.getElementsByTagName(f);var h=new Array();a=a.replace(/\-/g,"\\-");var g=new RegExp("(^|\\s)"+a+"(\\s|$)");var d;for(var c=0;c<e.length;c++){d=e[c];if(g.test(d.className)){h[h.length]=d}}return(h)}function show_hidden_elements(){var b=getElementsByClassName(document,"*","hide");for(var a=0;a<b.length;a++){b[a].className=b[a].className.replace(/hide/,"")}}function show_tabbed_data(){document.getElementById("tabbed_data").style.display="block";document.getElementById("show_tabbed_text").style.display="none"}function hide_tabbed_data(){document.getElementById("tabbed_data").style.display="none";document.getElementById("show_tabbed_text").style.display="block"}function get_settings(f,a,k,c){if(!k){k=settings}var g;for(var e in k[f]){var m=k[f][e];var b;b=null;if(k[f][e]["keys"]){for(var d in k[f][e]["keys"]){var h=k[f][e]["keys"][d];var l=a(h,c);if(m[l]){m=m[l]}else{if(m["*"]){m=m["*"]}else{break}}}if(m.value){b=m.value}}else{if(k[f][e]["default"]){b=k[f][e]["default"]}}if(b){if(g){g+=","+b}else{g=b}if(!k[f][e]["continue"]){break}}}return g}function split_setting(d){if(!d){return{}}var a=d.split(",");var b={};for(i=0;i<a.length;i++){var c=a[i].split(":",2);if(c&&c.length>1){b[c[0]]=c[1]}else{b[a[i]]=1}}return b}function mergeElementValues(e,f){for(var j=0;j<f.length;j++){var b=f[j];if(!b.getAttribute("name")){continue}var h=null;var k=null;if(b.className){var d=b.className.replace(/.*element_group([0-9]+).*/,"$1");if(d!=""){d+="."}h=d+b.getAttribute("name");if(b.className.match(/(^| )cat_data_select($| )/)){var g=[];for(var c=0;c<b.options.length;c++){g[c]=b.options[c]}k=g}}else{h=b.getAttribute("name")}if(h.match(/\[\]$/)&&b.value){h+=b.value}if(((b.type=="radio"||b.type=="checkbox")&&!b.checked)){if(typeof e[h]!="undefined"){delete e[h]}}else{if((b.value||k)&&!b.disabled){e[h]=b.value;if(k){e[h+".options"]=k}}else{e[h]="";if(typeof e[h+".options"]!="undefined"){delete e[h+".options"]}}}}return e}function setElementValues(a,c){for(var e=0;e<c.length;e++){var f=c[e];var b=null;if(f.className){var h=f.className.replace(/.*element_group([0-9]+).*/,"$1");if(h!=""){h+="."}key=h+f.getAttribute("name");if(f.className.match(/(^| )cat_data_select($| )/)){b=a[key+".options"]}}else{key=f.getAttribute("name")}if(key.match(/\[\]$/)&&f.value){key+=f.value}var g=a[key];if(f.type=="radio"||f.type=="checkbox"){if(g==f.value){f.checked=true}}else{if(g||b){if(b){f.options.length=0;for(var d=0;d<b.length;d++){f.options[d]=b[d]}f.disabled=false}f.value=g}}}}function ajax_request(a,c,j,g,f,h){var b=false;if(h==null){h="POST"}if(typeof f=="undefined"){f=true}try{b=window.XMLHttpRequest?new XMLHttpRequest():new ActiveXObject("Microsoft.XMLHTTP")}catch(d){}if(b!==false){b.onreadystatechange=function(){ajax_callback(j,g,b,f)};b.open(h,a,true);b.setRequestHeader("Content-Type","application/x-www-form-urlencoded");b.send(c)}}function ajax_callback(callback,params,xmlhttp,evaluate){if(xmlhttp.readyState==4){if(xmlhttp.status==200&&xmlhttp.responseText.indexOf("<!DOCTYPE")<0){if(evaluate){callback(eval("("+xmlhttp.responseText+")"),xmlhttp,params)}else{callback(xmlhttp.responseText,xmlhttp,params)}}else{callback(false,xmlhttp,params)}}}function setabusereport(b,j,h,g){var c=false;var d=getCookie("uid");try{c=window.XMLHttpRequest?new XMLHttpRequest():new ActiveXObject("Microsoft.XMLHTTP")}catch(f){return false}c.onreadystatechange=function(){if(c.readyState==4){var k=document.getElementById("abuseform");if(c.status==200&&c.responseText.indexOf("<!DOCTYPE")<0){k.innerHTML=c.responseText;var e=document.getElementById("new_uid");if(e&&d!=e.value){var l=10*365*24*60*60;setCookie("uid",e.value,l,"/")}document.getElementById("abuseoptionscontent").style.display="none"}else{k.innerHTML='<div><span class="error">Error</span></div>'}document.getElementById("abuseform").style.display="block"}};var a=b+"?action=insert&id="+j+"&abuse_type="+h+"&lang="+g;var d=getCookie("uid");if(d!=null){a=a+"&uid="+d}c.open("GET",a,true);c.setRequestHeader("If-Modified-Since","Thu, 1 Jan 1970 00:00:00 GMT");c.setRequestHeader("Cache-Control","no-cache, no-store");c.setRequestHeader("Pragma","no-cache");c.send(null)}function updateabusereport(b,d,a,g){var c=false;var j=document.getElementById("abuse_email").value;var m=document.getElementById("abuse_message").value;var k=getCookie("uid");try{c=window.XMLHttpRequest?new XMLHttpRequest():new ActiveXObject("Microsoft.XMLHTTP")}catch(h){return false}c.onreadystatechange=function(){if(c.readyState==4){var n=document.getElementById("reportabuseform");if(c.status==200&&c.responseText.indexOf("<!DOCTYPE")<0){n.innerHTML=c.responseText;var e=document.getElementById("new_uid").value;if(k!=e){var o=10*365*24*60*60;setCookie("uid",e,o,"/")}}else{n.innerHTML='<div><span class="error">Error</span></div>'}}};var l=b+"?action=update&id="+d+"&abuse_type="+a+"&report_id="+g;m=m.replace(/\n/g,"<br>");if(j!=""){l+="&email="+j}if(m!=""){l+="&abuse_message="+encodeURIComponent(m)}if(k!=null){l+="&uid="+k}else{var f=document.getElementById("new_uid").value;if(f!=null){l+="&uid="+f}}c.open("GET",l,true);c.setRequestHeader("If-Modified-Since","Thu, 1 Jan 1970 00:00:00 GMT");c.setRequestHeader("Cache-Control","no-cache, no-store");c.setRequestHeader("Pragma","no-cache");c.send(null)}function Pixel(b,j,l,h,g,m,f,c,e){var a;var k=new Date();if(!j){j="failure_"+window.location.host.replace(/\.|:/gi,"_")+window.location.pathname.replace(/\/|\./g,"_")}a=b+"/1x1_pages_"+j;if(l){a+="_c"+l}else{a+="_cpuk"}if(h){a+="_a"+h}else{a+="_apuk"}if(g){a+="_"+g}if(m){a+="_"+m}if(f){a+="_qh"+f}if(e){a+="_l"+e}a=a+".gif?r="+k.getTime();if(c&&getCookie(c)){a+="&"+c+"=1"}if(document.write_org!=null){document.write_org('<img src="'+a+'" height="1" width="1" id="stats_1x1">')}else{document.write('<img src="'+a+'" height="1" width="1" id="stats_1x1">')}}function toggleJobCategories(){try{elm=document.getElementById("all_job_cat");if(elm.style.display=="none"){elm.style.display="block"}else{elm.style.display="none"}}catch(a){}}function getValueFromSq(c){var b=getCookie("sq");if(b){var d=b.split("&");for(var a=0;a<d.length;a++){if(d[a].split("=")[0]==c){return d[a].split("=")[1]}}}return -1}function getRegionFromSq(){var a=getValueFromSq("ca");if(a!=-1){return a.split("_")[0]}return null}function scroll_down(f,c){var b=f+1;for(i=0;i<f;i++){var e=document.getElementById("thumb"+i);var d=e.className;if(!d.match(/hidden/)){b=i;e.className="hidden"}else{if(i>b&&i<b+(scroll_images_visible+1)){e.className=" "}}}if(b>=f-(scroll_images_visible+1)){document.getElementById("arrow_downB").style.display="none";document.getElementById("arrow_upB").style.display="inline"}else{document.getElementById("arrow_downB").style.display="inline";document.getElementById("arrow_upB").style.display="inline"}if(c!=1){var a=b+1;counter=a+1;showLargeImage(image_url+images[a]);document.getElementById("thumb"+a).className="selected"}}function scroll_up(e){var a=0;var b=0;for(i=e-1;i>=0;i--){var d=document.getElementById("thumb"+i);var c=d.className;if(!c.match(/hidden/)){a=i;d.className="hidden"}else{if(i<a&&i>a-(scroll_images_visible+1)){d.className=" ";b=i}}}if(a<7){document.getElementById("arrow_upB").style.display="none";document.getElementById("arrow_downB").style.display="inline"}else{document.getElementById("arrow_upB").style.display="inline";document.getElementById("arrow_downB").style.display="inline"}counter=b+1;showLargeImage(image_url+images[b]);document.getElementById("thumb"+b).className=" selected"}function next_imageB(b){if(!images[counter]){counter=0;reset_scrollB();return false}var a=document.getElementById("thumb"+counter);var c=new Image;c.src=image_url+images[counter];if((counter%scroll_images_visible)==0&&b==1&&counter!=0){scroll_down(images.length,1)}showLargeImage(image_url+images[counter]);thumbnailBorder(a,images.length);set_alt_title("main_pict");counter++}function reset_scrollB(){var a=images.length;for(i=0;i<a;i++){if(i<scroll_images_visible){document.getElementById("thumb"+i).className=" "}else{document.getElementById("thumb"+i).className="hidden "}}showLargeImage(image_url+images[0]);thumbnailBorder(document.getElementById("thumb0"),a);document.getElementById("arrow_upB").style.display="none";document.getElementById("arrow_downB").style.display="inline";counter=1}function format_phone(){var a=document.getElementById("phone").value;a=a.replace(/\D/g,"");if(a.length>10){a=a.substring(0,10)}if(a.length>=2&&a.length<10){a=a.replace(/^(\d\d)(\d)/g,"($1) $2")}if(a.length==10){a=a.replace(/^(\d\d)(\d\d\d\d)(\d\d\d\d)/g,"($1) $2 $3")}document.getElementById("phone").value=a};
