﻿var baseOfferURL="/oferty";var siteBaseUrl="";var EUR=3.8;var gemiusID=new String("zZ1AhCtpT_B5Vb0ze1hWQvU2Hbcpy2MWnK1iOvsKb3..M7");function BuildFlash(path,w,h,bkg,vars,name,live){var str;if(path!=""){str='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"  WIDTH="'+w+'" HEIGHT="'+h+'" id="'+name+'" ALIGN=""><param name="movie" value="'+path+'"><param name="quality" value="high"><param name="bgcolor" value="'+bkg+'"><param name="menu" value="false"><param name="wmode" value="transparent"><param name="flashvars" value="'+vars+'"><EMBED src="'+path+'" FlashVars="'+vars+'" quality="high" bgcolor="'+bkg+'" WIDTH="'+w+'" HEIGHT="'+h+'" NAME="'+name+'" swLiveConnect='+live+' ALIGN="" wmode="transparent" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED></object>'}return str}function escapeURI(str){str=str.replace(/=/g,"%3D");str=str.replace(/&/g,"%26");str=str.replace(/"/g,"%22");return str}function test(){alert("test")}function getQuerryStringByName(name){if(typeof(name)=="undefined"||name==""){return""}var url=typeof(window.pracujSearchCriteriaRawUrl)=="undefined"?url=new String(window.location):new String(window.pracujSearchCriteriaRawUrl);var str_tmp=url.toUpperCase().split("?");if(str_tmp.length<2){return""}querry=str_tmp[1];name=name.toUpperCase();if(querry.match(/%20\w+=/)){element=querry.split(escape("&"))}else{element=querry.split("&")}i=0;while(i<element.length){e=element[i];_item=e.split("=");if(_item[0]==name){return _item[1]}i++}return""}function showPage(page){actPage=page;hidePages();if(artPages.length>1){var obj=document.getElementById(artPages[page]);obj.style.display="block";var objLead=null;objLead=document.getElementById("artLead");if(objLead!=null){if(actPage==0){objLead.style.display="block"}else{objLead.style.display="none"}}makePager()}if(document.location.hash==""){document.location.hash="#top"}}function hidePages(page){for(i in artPages){document.getElementById(artPages[i]).style.display=(i!=actPage)?"none":"block"}}function resetPager(){var obj=document.getElementById("artPager");obj.innerHTML=""}function makePager(){var obj=document.getElementById("artPager");resetPager();var count=artPages.length-1;for(i=0;i<artPages.length;i++){if(actPage!=0){var npHref="javascript:showPage("+eval(actPage-1)+")";var npClass="linkEn prevPage";var npDis=false}if(actPage==0){var npHref="";var npClass="linkDis prevPage";var npDis=true}if(i==0){var nxtPage=document.createElement("A");var nxtText=document.createTextNode("« poprzednia strona");nxtPage.href=npHref;if(npDis==true){nxtPage.onclick=function(){return false}}nxtPage.appendChild(nxtText);nxtPage.className=npClass;obj.appendChild(nxtPage);var holder=document.createElement("DIV");holder.id="linksHolder";obj.appendChild(holder)}var spElement=document.createElement("SPAN");if(i!=count){var spacer=document.createTextNode(" | ");spElement.appendChild(spacer)}else{var spacer=document.createTextNode(" ");spElement.appendChild(spacer)}if(i!=actPage){var elText=document.createTextNode(eval(i+1));var element=document.createElement("A");element.href="javascript:showPage("+i+");";element.className="pagerElement"}else{var element=document.createElement("SPAN");var elText=document.createTextNode(eval(i+1));element.className="pagerElement"}element.appendChild(elText);obj2=document.getElementById("linksHolder");obj2.appendChild(element);obj2.appendChild(spElement);if(actPage!=count){var lpHref="javascript:showPage("+eval(actPage+1)+")";var lpClass="linkEn nextPage";var lpDis=false}if(actPage==count){var lpHref="";var lpClass="linkDis nextPage";var lpDis=true}if(i==count){var nxtPage=document.createElement("A");var nxtText=document.createTextNode("następna strona »");nxtPage.href=lpHref;if(lpDis==true){nxtPage.onclick=function(){return false}}nxtPage.appendChild(nxtText);nxtPage.className=lpClass;obj.appendChild(nxtPage)}}if(obj.hasChildNodes()){}}function getRandomImage(imagesArr){var count=imagesArr.length;if(count){var r=Math.floor(Math.random()*count);return imagesArr[r]}else{return null}}function swapFAQ(faqID){var obj=document.getElementById(faqID);var s=obj.style;if(s.display=="none"){s.display="block"}else{if(s.display=="block"){s.display="none"}}}function OpenWindow(url,title,w,h){if(window.screen){aw=screen.availwidth;ah=screen.availheight}else{aw=640;ah=450}settings="left="+(aw-w)/2+",top="+(ah-h)/2+",screenX="+(aw-w)/2+",screenY="+(ah-h)/2+",width="+w+",height="+h+",toolbar=no,location=yes,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes";my_window_open(url,title,settings)}function authorEmail(s){var s2="";for(var i=0;i<s.length;i++){s2+=String.fromCharCode(s.charCodeAt(i)+1)}document.location.href="mailto:"+s2}function initTradeOfferForm(){}function tradeOfferSearch(){var obj=document.search;var catObj=obj.CategoryId;if(obj){if((catObj.type.indexOf("select")>-1)&&(catObj[catObj.selectedIndex].value=="")){alert("Proszę wybrać kategorię.");return}obj.submit()}}var _xx_url="";var _xx_wname="";var _xx_params="";function xx_wopen(){if(typeof(Error)!="undefined"){eval("try { if(_xx_url!='') window.open(_xx_url,_xx_wname,_xx_params); _xx_url=''; } catch(_xx_ev) {}")}else{if(_xx_url!=""){window.open(_xx_url,_xx_wname,_xx_params)}_xx_url=""}}function my_window_open(url,wname,params){if(typeof(Error)!="undefined"){eval("try { _xx_wo=window.open(url,wname,params); } catch(_xx_ev) {}")}else{_xx_wo=window.open(url,wname,params)}if(!_xx_wo){_xx_url=url;_xx_wname=wname;_xx_params=params;if(document.attachEvent){document.attachEvent("onclick",xx_wopen)}else{if(document.addEventListener){document.addEventListener("click",xx_wopen,false)}}}}function add2Favorite(){if(document.all){window.external.AddFavorite(location.href,document.title)}else{alert("Funkcja aktywna w jedynie w przeglądarce Microsoft Internet Explorer.")}}function f2f(){var aspxUrl=siteBaseUrl+"/Formularze/f2friend.aspx";aspxUrl+="?url="+encodeURIComponent(document.location.pathname);OpenWindow(aspxUrl,"F2F",450,500)}function printThis(){window.focus();window.print()}function URLEncode(plaintext){return encodeURIComponent(plaintext)}function chooseCountry(val){var obj1=document.search.R;var obj2=document.search.C;if(val==0){obj1.disabled=false;obj1.style.display="inline";obj2.disabled=true;obj2.style.display="none"}if(val==1){obj1.disabled=true;obj1.style.display="none";obj2.disabled=false;obj2.style.display="inline"}}function scopeOfferSearch(){document.search.submit()}function initScopeOfferSearch(){chooseCountry(0)}var adKW="KW_"+getQuerryStringByName("KW")+",";var adT="T_"+getQuerryStringByName("T")+",";var adS="S_"+getQuerryStringByName("S")+",";var adR="R_"+getQuerryStringByName("R")+",";var adSE="SE_"+getQuerryStringByName("SE")+",";var adC="C_"+getQuerryStringByName("C")+",";var adM="M_"+getQuerryStringByName("M");var eduAdStr=adKW+adT+adS+adR+adSE+adC+adM;function tipyEduPracujPl(){return null}function getHeight(element){element.innerHTML=element.parentNode.offsetHeight;return}function pracujAddEvent(ob,evname,fn){if(ob.attachEvent){ob.attachEvent("on"+evname,fn)}else{if(ob.addEventListener){ob.addEventListener(evname,fn,false)}}}if("https:"!=document.location.protocol){document.write('<script type="text/javascript" src="http://www.pracuj.pl/_scripts/pStats.js"></script>')}var mojPracujAdres="/MojPracuj";function error(obj,jquery){var err='<a href="'+mojPracujAdres+'/Rejestracja.aspx">Zarejestruj się</a> | <a href="'+mojPracujAdres+'">Zaloguj</a> | Jesteś zalogowany? <a href="'+mojPracujAdres+'/Logout.aspx?r=1" class="logoutLink">Wyloguj</a>';obj.innerHTML=err}function loadLogoutLinkFromMojPracujSession(obj,jquery){if(typeof isLoggedIn==="undefined"||isLoggedIn==null){try{if(!window.ActiveXObject){var xmlDocSession=new XMLHttpRequest();xmlDocSession.onreadystatechange=function(evt){createLogoutLinkFromMojPracujSession(obj,xmlDocSession,jquery)};xmlDocSession.open("GET","/mojpracuj/session.ashx",true);xmlDocSession.send(null)}else{var xmlDocSession=new ActiveXObject("Microsoft.XMLHTTP");xmlDocSession.onreadystatechange=function(){if(xmlDocSession.readyState==4){createLogoutLinkFromMojPracujSession(obj,xmlDocSession,jquery)}};xmlDocSession.open("GET","/mojpracuj/session.ashx",true);xmlDocSession.send(null)}}catch(e){error(obj,jquery)}}else{if(isLoggedIn==true&&window.userFirstName!=null&&window.userLastName!=null&&window.userGender!=null){createLoginHeader(obj,userFirstName,userLastName,userGender)}}}function createLogoutLinkFromMojPracujSession(obj,req,jquery){if(typeof isLoggedIn!="undefined"&&isLoggedIn!=null){if(isLoggedIn==true&&window.userFirstName!=null&&window.userLastName!=null&&window.userGender!=null){createLoginHeader(obj,userFirstName,userLastName,userGender)}return}if(req.readyState==4){if(req.status==200){try{if(obj!=null){if(req.responseXML!=null){xmlDocSession=req.responseXML;if(xmlDocSession.hasChildNodes()){var xml=xmlDocSession.getElementsByTagName("xml")[0];if(xml!=null){var userFirstName=xml.getAttribute("fname");var userLastName=xml.getAttribute("lname");var userGender=xml.getAttribute("gender");var userEmail=xml.getAttribute("email");if(userFirstName!=null){isLoggedIn=true;createLoginHeader(obj,userFirstName,userLastName,userGender)}if(userFirstName!=null){$("#jal input.jatIn").val(userEmail)}}}}}}catch(e){error(obj,jquery)}}else{error(obj,jquery)}}else{}}function createLoginHeader(obj,userFirstName,userLastName,gender){if(isLoggedIn!="undefined"&&isLoggedIn){var name=userFirstName+" "+userLastName;window.ugender=gender;var gAttr=(gender=="F")?"zalogowana":"zalogowany";if(name==" "){name=(gender=="F")?"nieznajoma":"nieznajomy"}var a="<p>Jesteś "+gAttr+" jako <a href='"+mojPracujAdres+"' class='pName'>"+name+"</a> <span>|</span> <a href='"+mojPracujAdres+"/Logout.aspx?r=1' class='logoutLink'>Wyloguj się</a>";obj.innerHTML=a}}function clickButtonOnEnter(event,buttonID){if((event.which?event.which:event.keyCode)==13){event.returnValue=false;event.cancel=true;document.getElementById(buttonID).click()}}function setFocusOnEnter(event,buttonID){if((event.which?event.which:event.keyCode)==13){event.returnValue=false;event.cancel=true;document.getElementById(buttonID).focus()}}function getOfferID(){var obj=document.location.hash;obj=obj.substr(1,obj.length).toString();var re=/\D+/;if(obj!=""&&!re.test(obj)){OpenWindow(baseOfferURL+"/"+obj+".html","PokazOferte",700,500)}}getOfferID();function clickT(obj){var tObj=document.getElementById("tabs");var id=obj.id.substr(1);hideAllTabs();tObj.style.backgroundImage="url("+tabsImgArr[id]+")";showTab(tabsCArr[id])}function showTab(name){document.getElementById(name).style.display="block"}function hideAllTabs(){for(var i=0;i<tabsCArr.length;i++){var obj=document.getElementById(tabsCArr[i]);obj.style.display="none"}}function offerSearch(){objForm=document.search;objKW=objForm.KeyWords;if(objKW.value=="np. handlowiec"){objKW.value=""}objKW.value=objKW.value.replace(/\+/g,"%2b");objForm.submit()}function initMainSearchForm(){objForm=document.search;if(objForm.KeyWords.value==""){objForm.KeyWords.value="np. handlowiec"}if(document.getElementById("webid").value==""){document.getElementById("webid").value="WebID"}}function showOffer(){var obj=document.getElementById("webid");var webId=obj.value;var re=/\D+/;if((webId!="WebID")&&(webId!="")&&!re.test(webId)){OpenWindow(baseOfferURL+"/"+webId+".html","PokazOferte",700,500)}else{webId="";alert("Proszę wprowadzić poprawne WebID.");obj.focus()}}function initEmplList(){setActivePage(lArr[0])}function setActivePage(id){var obj=document.getElementById(id);for(var i=0;i<lArr.length;i++){var tmpObj=document.getElementById(lArr[i]);tmpObj.style.display="none"}obj.style.display="block"}function my_load(){document.search.KeyWords.value=document.search.KeyWords.value.replace(/%2b/g,"+")}function offerSearchManager(){objForm=document.search;objForm.submit()}function showOfferManager(){var obj=document.getElementById("webid");var webId=obj.value;var re=/\D+/;if((webId!="WebID")&&(webId!="")&&!re.test(webId)){OpenWindow(baseOfferURL+"/"+webId+".html","PokazOferte",700,500)}else{webId="";alert("Proszę wprowadzić poprawne WebID.");obj.focus()}}function initMainSearchFormManager(){objForm=document.search;objForm.focus()}function changeRegionCountries(obj,regionList,coutryList,regCountryList){try{if(obj.tagName.toLowerCase()=="select"){var selected=obj.options[obj.selectedIndex].value}else{if(obj.tagName.toLowerCase()=="input"){var selected=obj.value}else{return}}}catch(e){}var regionListObj=document.getElementById(regionList);if(selected!=null){var rl=document.getElementById(regionList);var cl=document.getElementById(coutryList);var rcl=document.getElementById(regCountryList);if(selected=="0"){if(rl!=null){rl.style.display="none"}if(cl!=null){cl.style.display="none"}if(rcl!=null){rcl.style.display=""}}if(selected=="1"){if(rl!=null){rl.style.display=""}if(cl!=null){cl.style.display="none"}if(rcl!=null){rcl.style.display="none"}}if(selected=="2"){if(rl!=null){rl.style.display="none"}if(cl!=null){cl.style.display=""}if(rcl!=null){rcl.style.display="none"}}}}function IfIE6(){return(typeof document.body.style.maxHeight==="undefined")}var mojPracuj_UserData_Functions=new Array();String.format=function(str){if(arguments.length<=1){return str}for(i=1;i<arguments.length;i++){str=str.replace("{"+(i-1)+"}",arguments[i])}return str};function loadUserData(){if(isLoggedIn!="undefined"&&isLoggedIn!=null){if(isLoggedIn==true&&window.userFirstName!=null&&window.userLastName!=null&&window.userGender!=null&&window.userEmail!=null){for(var ii=0;ii<mojPracuj_UserData_Functions.length;ii++){eval(String.format(mojPracuj_UserData_Functions[ii],userFirstName,userLastName,userGender,userEmail))}}return}try{if(!window.ActiveXObject){var xmlDocSession=new XMLHttpRequest();xmlDocSession.onreadystatechange=function(evt){runUserDataFunctions(xmlDocSession)};xmlDocSession.open("GET","/mojpracuj/session.ashx",true);xmlDocSession.send(null)}else{var xmlDocSession=new ActiveXObject("Microsoft.XMLHTTP");xmlDocSession.onreadystatechange=function(){if(xmlDocSession.readyState==4){runUserDataFunctions(xmlDocSession)}};xmlDocSession.open("GET","/mojpracuj/session.ashx",true);xmlDocSession.send(null)}}catch(e){error(obj,jquery)}}function runUserDataFunctions(req){if(req.readyState==4){if(req.status==200){try{if(req.responseXML!=null){xmlDocSession=req.responseXML;if(xmlDocSession.hasChildNodes()){var xml=xmlDocSession.getElementsByTagName("xml")[0];if(xml!=null){var userEmail=xml.getAttribute("email");if(userEmail!=null){isLoggedIn=true;var userFirstName=xml.getAttribute("fname");var userLastName=xml.getAttribute("lname");var userGender=xml.getAttribute("gender");for(var ii=0;ii<mojPracuj_UserData_Functions.length;ii++){eval(String.format(mojPracuj_UserData_Functions[ii],userFirstName,userLastName,userGender,userEmail))}}else{isLoggedIn=false}}}}}catch(e){}}else{}}else{}}function loadEmailToTextBox(obj,text){if(text!=null&&obj!=null&&text!="null"&&text!="NULL"){if(obj.value=="Twój e-mail"){obj.value=text}}}function jalCheckEmail(obj){var re=/^([a-zA-Z0-9_\.\-])+\@([a-zA-Z0-9\-_\.])+\.([a-zA-Z_\.]){2,4}$/;if(obj.value==""||(obj.value=="Twój email")){obj.value="";obj.focus();alert("Proszę wprowadzić swój adres e-mail.");return false}else{if(!re.test(obj.value)){alert("Proszę wprowadzić poprawny adres e-mail.");obj.value="";obj.focus();return false}else{this.submit()}}}function loadEmailToTextBoxFromMojPracujSession(obj,hide){try{if(document.implementation&&document.implementation.createDocument){var xmlDocSession=document.implementation.createDocument("","",null);xmlDocSession.async=true;xmlDocSession.onload=function(evt){loadEmailFromMojPracujSession(obj,xmlDocSession,hide)};var loaded=xmlDocSession.load("/mojpracuj/session.ashx")}else{if(window.ActiveXObject){var xmlDocSession=new ActiveXObject("Microsoft.XMLDOM");xmlDocSession.onreadystatechange=function(){if(xmlDocSession.readyState==4){loadEmailFromMojPracujSession(obj,xmlDocSession,hide)}};xmlDocSession.async=true;xmlDocSession.load("/mojpracuj/session.ashx")}else{return}}}catch(e){}}function loadEmailFromMojPracujSession(obj,xmlDocSession,hideB){if(obj!=null){if(xmlDocSession.hasChildNodes()){var xml=xmlDocSession.getElementsByTagName("xml")[0];if(xml!=null){var email=xml.getAttribute("email");if(email!=null){if(hideB==true){hide(obj)}obj.value=email;return true}}}}return false}function buildToolBox(){if(isLoggedIn){var a=document.getElementById("toolbox");a.innerHTML='<h2>Moje narzędzia</h2>\n<a href="/MojPracuj/EdycjaProfilu.aspx?utm_source=pracuj&utm_medium=link&utm_content=dodaj-cv&utm_campaign=home-narzedzia">Dodaj CV</a>\n<span class="separator"></span>\n<a href="/MojPracuj/JobAlerts.aspx?utm_source=pracuj&utm_medium=link&utm_content=jobalert&utm_campaign=home-narzedzia">Ustaw powiadomienia JobAlert</a>\n<span class="separator"></span>\n<a href="/MojPracuj/Aktowka.aspx?utm_source=pracuj&utm_medium=link&utm_content=aktowka&utm_campaign=home-narzedzia">Zapamiętane oferty</a>\n<span class="separator"></span>\n<a href="/MojPracuj/Artykuly/wzory-cv-zyciorys.aspx?utm_source=pracuj&utm_medium=link&utm_content=wzory-cv&utm_campaign=home-narzedzia">Wzory CV</a>\n<span class="separator"></span>'}}function initSearchIconHints(){$(".additionalIcons a").hover(function(){$(this).before('<div class="hoverHint"><div><table><tr><td class="text">'+$(this).attr("name")+'</td><td class="image"></td></tr></table></div></div>')},function(){$(".hoverHint").remove()});$("h1 a.t0").hover(function(){$(this).before('<div class="hoverHint"><div><table><tr><td class="text">'+$(this).attr("name")+'</td><td class="image"></td></tr></table></div></div>')},function(){$(".hoverHint").remove()})}function OpenFbLogin(params){CloseFbWindow();var width=627;var height=326;var left=parseInt((screen.availWidth/2)-(width/2));var top=parseInt((screen.availHeight/2)-(height/2));var protocol="https:";if("https:"!=document.location.protocol){protocol="http:"}var url="";var hostForFB=document.location.host.toLowerCase();if(hostForFB.indexOf("localhost")>-1){url="https://graph.facebook.com/oauth/authorize?client_id=119628781419085&redirect_uri="+protocol+"//localhost/mojPracuj/facebook.ashx"}else{if(hostForFB.indexOf("devel")>-1){url="https://graph.facebook.com/oauth/authorize?client_id=144844052206605&redirect_uri="+protocol+"//head.pracuj.devel/mojPracuj/facebook.ashx"}else{if(hostForFB.indexOf("test")>-1){url="https://graph.facebook.com/oauth/authorize?client_id=125086234205294&redirect_uri="+protocol+"//test.pracuj.pl/MojPracuj/facebook.ashx"}else{if(hostForFB.indexOf("web1")>-1){url="https://graph.facebook.com/oauth/authorize?client_id=125086234205294&redirect_uri="+protocol+"//web1.pracuj.pl/MojPracuj/facebook.ashx"}else{if(hostForFB.indexOf("web2")>-1){url="https://graph.facebook.com/oauth/authorize?client_id=125086234205294&redirect_uri="+protocol+"//web2.pracuj.pl/MojPracuj/facebook.ashx"}else{if(hostForFB.indexOf("web3")>-1){url="https://graph.facebook.com/oauth/authorize?client_id=125086234205294&redirect_uri="+protocol+"//web3.pracuj.pl/MojPracuj/facebook.ashx"}else{if(hostForFB.indexOf("web4")>-1){url="https://graph.facebook.com/oauth/authorize?client_id=125086234205294&redirect_uri="+protocol+"//web4.pracuj.pl/MojPracuj/facebook.ashx"}else{if(hostForFB.indexOf("pracuj")>-1){url="https://graph.facebook.com/oauth/authorize?client_id=125086234205294&redirect_uri="+protocol+"//www.pracuj.pl/MojPracuj/facebook.ashx"}}}}}}}}if(typeof params!="undefined"){url=url+params}if("https:"!=document.location.protocol){if(url.indexOf("%3f")>=0){url=url+"%26ssl%3d0"}else{url=url+"%3fssl%3d0"}}url=url+"&display=popup&scope=email%2cuser_birthday%2cuser_education_history%2cuser_work_history%2cuser_location%2cuser_hometown";fbLoginWindow=window.open(url,"fbWindow","resizable=1,width=627,height=326,left="+left+",top="+top)}function CloseFbWindow(){if(typeof fbLoginWindow!="undefined"){if(false==fbLoginWindow.closed){fbLoginWindow.close()}}}function windowOpen(url){window.open(url)}function closeWindowOnEsc(e){if((e.keyCode||e.which)==27){e.preventDefault();$.closeDOMWindow()}}var winUrl=siteBaseUrl+"/Formularze/f2friend.aspx";winUrl+="?url="+encodeURIComponent(document.location.pathname);function ClosePopup(){$.closeDOMWindow()}if(typeof jQuery!="undefined"){jQuery(document).ready(function(){try{$(".openJDOMWindow").openDOMWindow({height:620,width:680,eventType:"click",windowSource:"iframe"}).keydown(closeWindowOnEsc);$(".openJDOMWindowWithUrl").openDOMWindow({height:650,width:680,eventType:"click",windowSource:"iframe",windowSourceURL:winUrl,windowSourceAttrURL:""}).keydown(closeWindowOnEsc)}catch(e){}})};
