var currentSort="",currentInstance="",networkSearch=" ",hasRestrictChanged=true,query="",queryFixedRestrict="",myKonto,myPrinter,myEmail,AddListIDs="0",ResListIDs="0",res3,HasReservation=false,viewmodus=0,lanOpacHeight=0,myFormStatus=0,formContent="#content",formContentTop="#content-top",formContentBottom="#content-bottom",formContentSearch="#content-search",formContentIndexSearch="#content-index-search",formMainAction="#mainaction",formMain="#main",formRightbar="#rightbar",formLeftbar="#leftbar", formReiterbalk="#SubReiterbalk",formReiterbalkAcc="#SubReiterbalkAcc",formTipMedien="#tipMedien",containerRestrictAvailable="#restrictavailable",containerRestrictActive="#restrictactive",containerRestrictIndex="#restrictindex",containerRestrictMerkliste="#merklistefunctions",imagePlus=getImageURL()+"images/inhalt/A_Plus_13x13.png",imageMinus=getImageURL()+"images/inhalt/A_Minus_13x13.png",SocialNetFacebook="www.facebook.com/sharer.php?u=",SocialNetTwitter="www.addthis.com/bookmark.php?pub=&v=250&source=tbx-250&tt=0&s=twitter&url=", SocialNetWinLive="favorites.live.com/quickadd.aspx?marklet=1&mkt=en-us&url=",SocialNetGoogle="www.google.com/bookmarks/mark?op=edit&output=popup&bkmk=",SocialNetYahoo="bookmarks.yahoo.com/toolbar/savebm?opener=tb&u=",SocialNetIcio="www.icio.de/add.php?url="; function OpacResult(a,b,c){this.currentPageEnd=this.currentPageBegin=0;this.currentRowNr=-1;this.maxRowNr=0;this.arrRestrict=[];this.querycomplet="";this.currentPage=0;this.nextresultcache="";this.arrMedienID=[];this.urlBase=a;this.instance=b;this.NK=c;this.ansicht=0;this.targetElement=b==1||b==3?formContentTop:formContentBottom} OpacResult.prototype={clear:function(){this.maxRowNr=this.currentRowNr=this.currentPageEnd=this.currentPageBegin=0;this.arrRestrict=[];this.querycomplet="";this.currentPage=0;this.nextresultcache="";this.arrMedienID=[]},buildQuery:function(){this.currentPage=0;if(this.instance==1)this.querycomplet=query;if(this.instance==2)this.querycomplet=buildQueryNetworkSearch();var a=encodeURIComponent("&");if(query!=""&&this.arrRestrict.length>0)if(this.instance==1)this.querycomplet=query+a+this.arrRestrict.join(a); else{if(this.instance==2)this.querycomplet=buildQueryNetworkSearch()+a+this.arrRestrict.join(a)}else if(this.arrRestrict.length>0)this.querycomplet=this.arrRestrict.join(a);if(this.NK!=null&&this.NK>0)this.querycomplet+=a+"NK="+this.NK;if(queryFixedRestrict!=null&&queryFixedRestrict!=""){if(this.querycomplet!="")this.querycomplet+=a;this.querycomplet+=queryFixedRestrict}},nextPage:function(){this.currentPage++;return this.getResult()},prevPage:function(){this.currentPage--;return this.getResult()}, getPage:function(a){this.currentPage=a;this.getResult();return false},getResult:function(){this.instance!=2?setwaitpage():$(this.targetElement).hide();this.requestResultset(this.currentPage,true,true);this.currentRowNr=-1;return true},requestResultset:function(a,b,c){ResetTimer();var d="";if(currentSort!="")d="&s="+currentSort;var e=this;if(this.instance>2)c&&$.postWM(this.urlBase+"Handler.ashx","q="+this.querycomplet+"&p="+a+d+"&i="+this.instance,function(f){e.loadResultset(f,b,c)},"html");else $.getWM(this.urlBase+ "Handler.ashx","q="+this.querycomplet+"&p="+a+d+"&i="+this.instance,function(f){e.loadResultset(f,b,c)},"html");return true},loadResultset:function(a,b,c){a=this.evalResult(a,b);if(c)if(DesignVersion==0)$(this.targetElement).show().html(a);else{if(this.instance==1&&(myFormStatus==0||myFormStatus==1)||this.instance==3&&myFormStatus==8||this.instance==4&&myFormStatus==11||this.instance==2&&myFormStatus==6)$(this.targetElement).show().html(a);else if(this.instance==2&&myFormStatus==1||this.instance== 1&&myFormStatus==6)$(this.targetElement).html(a);this.instance!=3&&this.instance!=4?loadChngFrmResult():ChngFrmMerkliste()}if(b){this.requestResultset(this.currentPage+1,false,false);this.currentPage>0&&this.requestResultset(this.currentPage-1,false,false)}return true},evalResult:function(a,b){if(a==null||a=="")return"";var c=a.indexOf("");if(c<0)return a;var d=a.substring(c+10,a.length-12);a=a.substring(0,c-1);c=d.split(";");if(c==null||c.length<2)return a;d=c[0];if(b)this.currentPageBegin= d;this.maxRowNr=c[1];for(var e=2;e");if(c>0){a.length>=c+10&&a.substring(c+9,c+10)=="1"?$("#cmdAllReservation").show():$("#cmdAllReservation").hide();a=a.substring(0,c)}c=a.indexOf("");if(c>0){networkSearch=a.substring(c+15,a.length-15);a=a.substring(0,c-1)}return a},getDetail:function(a){this.currentRowNr=a;return this.requestDetail()},getDetailSingle:function(a){this.currentRowNr=-1;this.arrMedienID[0]= a;return this.requestDetail()},getCurrentDetailId:function(){return this.currentRowNr<0?this.arrMedienID[0]:this.arrMedienID[this.currentRowNr]},changeDetailAnsicht:function(a){this.ansicht=a},requestDetail:function(){ResetTimer();ChngFrmDetail();var a=this.getCurrentDetailId();a="&i="+this.instance+(a!=null?"&id="+a:"&q="+query);if(this.ansicht>0)a+="&art="+this.ansicht;if(wmSessionID!=null)a+="&aid="+wmSessionID;if(smartCopy=="1")a+="&sc=1";var b=this;$.getWM(this.urlBase+"Detail.ashx","nr="+this.currentRowNr+ a,function(c){b.showDetail(c)},"html");return true},showDetail:function(a){evaldetailresult(a,this);loadChngFrmDetail(this.instance,this.getCurrentDetailId());return true},nextDetail:function(){this.currentRowNr++;if(this.currentRowNr>this.currentPageEnd){this.currentPage++;this.requestResultset(this.currentPage,true,false)}return this.requestDetail()},prevDetail:function(){this.currentRowNr--;if(this.currentRowNr");if(c>0){HasReservation=opacReservierung>0&&a.length>=c+10&&a.substring(c+9,c+10)=="1"?true:false;a=a.substring(0,c)}c=a.indexOf("");if(c>0){var d=a.substring(c+10,c+42);a=a.substring(0,c);if(b.currentRowNr==-1&&b.arrMedienID.length==1&&b.arrMedienID[0].length<20){b.arrMedienID[0]=d;b.currentRowNr=0}}c=a.indexOf("");if(c<0)return a;d=a.substring(c+5,a.length-6);$("#detailimage").html(d);a=a.substring(0, c-1);DesignVersion>0&&$("#newdetailnavigation").html("");if(myFormStatus!=6&&myFormStatus!=7){$(formContentBottom).hide();$(formContentTop).html(a).show()}else{$(formContentBottom).html(a).show();$(formContentTop).hide()}if(a.length<=150){hidedetailbar();$(formReiterbalk).hide();$(formReiterbalkAcc).hide();return true}if(b.currentRowNr<=0){c=document.getElementById("cmddetailback");if(c!=null)c.style.display="none"}if(b.currentRowNr>=b.maxRowNr||b.currentRowNr==-1){c=document.getElementById("cmddetailforward"); if(c!=null)c.style.display="none"}c=document.getElementById("detailimage");if(c!=null)c.style.display="block";c=document.getElementById("commitaction");if(c!=null)c.style.display="none";c=document.getElementById("detailfunctions");if(smartCopy==0)if(DesignVersion==0)if(HasReservation&&b.instance!=2){if(c!=null)c.style.display="block"}else{if(c!=null)c.style.display="none"}else if(b.instance!=2){if(c!=null)c.style.display="block";HasReservation?$("#cmdReservation").show():$("#cmdReservation").hide(); if(isLan==0){$("#social_bookmark").show();d=document.URL.toLocaleLowerCase();c=encodeURIComponent($("#detailheadertitel b").html());d=d.indexOf("default.aspx")==-1?d+"default.aspx":d;if(d.indexOf("?id=")>-1)d=d.split("=")[0]+"=";d=d.indexOf("?id=")==-1?d+"?id="+b.getCurrentDetailId():d+b.getCurrentDetailId();d=encodeURIComponent(d);var e="http://"+SocialNetFacebook+d+"&t="+c;$("#Facebook").attr("href",e);e="http://"+SocialNetTwitter+d+"&title="+c;$("#Twitter").attr("href",e);e="http://"+SocialNetGoogle+ d+"&title="+c;$("#Google").attr("href",e);e="http://"+SocialNetIcio+d+"&title="+c;$("#Icio").attr("href",e);e="http://"+SocialNetWinLive+d+"&title="+c;$("#Microsoft").attr("href",e);c=$("#detailheadertitel b").html();setTitle(": "+c);c=c.replace(/ /g,"+");e="http://"+SocialNetYahoo+d+"&t="+c;$("#Yahoo").attr("href",e)}}else{if(c!=null)c.style.display="none"}else if(smartCopy==1&&b.instance==1){$("#cmdSmartCopy").click(function(){document.location="http://smartcopy.winmedio.net/"+res1.getCurrentDetailId()}); $("#cmdReservation").hide();$("#cmdSmartCopy").show();$("#detailfunctions").show();DesignVersion>0&&$("#cmdDetailMerkliste").hide()}c=document.getElementById("merklistefunctions");if(c!=null)c.style.display="none";return a}function buildQueryNetworkSearch(){if(query.indexOf("erw")>-1&&query.indexOf("%7C")>-1){var a=query.split("%7C"),b=encodeURIComponent("$");return a.length>=3&&a[2].indexOf(b)>-1?a[2].split(b)[0].length>3?a[2].split(b)[0]:query:a[2]}else return query} function hidedetailbar(){var a;a=document.getElementById("detailimage");if(a!=null)a.style.display="none";a=document.getElementById("detailfunctions");if(a!=null)a.style.display="none";a=document.getElementById("commitaction");if(a!=null)a.style.display="none";a=document.getElementById("merklistefunctions");if(a!=null)a.style.display="none"}var res1=new OpacResult("",1,0); function InitializeEvents(){var a=document.getElementById("cmdSearch");if(a!=null)a.onclick=search;$("#cmdReset").click(loadnew);$("#txtSearch").keypress(function(b){if((b.keyCode?b.keyCode:b.which)==13){search();return false}else return true}).focus();if(DesignVersion>0){$("#cmdGeneralSearch").click(ChngFrmStartpage);$("#cmdIndex").click(requestindex);$("#cmdErgebnisse").click(requestsearch);res2!=null&&$("#cmdVerbundSearch").click(requestnetworksearch);$("#cmdResetSuche").click(resetall);$("#cmdKonto").click(showKonto); $("#cmdMerkliste").click(requestMerkliste);$("#cmdDetailMerkliste").click(addListDetail);$(formMainAction).hide();$(document).ready(function(){$("#txtSearch").placeholder({offClass:"inputOff",onClass:false});$("#txtUserName").placeholder({offClass:"inputOff",onClass:false});$("#txtPassword").placeholder({offClass:"inputOff",onClass:false})})}else $("#cmdGeneralSearch").click(search);$("#cmdProfiSearch").click(requestexpertsearch);a=document.getElementById("cmdReservation");if(a!=null)if(opacReservierung== 1)a.onclick=reservieren;else if(opacReservierung>=2)a.onclick=reservationRequest;a=document.getElementById("cmdLogin");if(a!=null)a.onclick=loginButtonClick;if(isLan!=1){myKonto=new Konto;myKonto.requestLogin("","",0)}else $("#homelinks").hide();$("#txtPassword").keypress(function(b){if((b.keyCode?b.keyCode:b.which)==13){loginButtonClick();return false}else return true});a=document.getElementById("txtUserName");if(a!=null)a.onkeypress=ResetTimerEvent;document.URL.toLocaleLowerCase().indexOf("default.aspx?id=")== -1&&requestStartPage();isReset=false;ua_oldSafari&&alert(navigator.userAgent)} function search(){var a=document.getElementById("txtSearch");$(formTipMedien).html("").hide();if(a.value.length<=0){a.focus();alert(nosearchtext);return true}else{var b=a.value;a.select();a=/[0-9]+(\.)$/;var c=/[0-9]/;res1.clear();res2!=null&&res2.clear();hasRestrictChanged=true;if(b.length<8&&typeof IsVerbundCatalog=="undefined"&&a.test(b)){myFormStatus=2;return res1.getDetailSingle(b.replace(".",""))}else if(isISBN(b))query="erw:"+encodeURIComponent("0|9|"+b);else{if(!c.test(b))if(b.length<2){alert(nosearchtext); return true}query=encodeURIComponent(b)}setSearchList(query,b)}loadnewsearch();requestsearch();return true}function indexnewsearch(a,b,c){newsearch(a,b);$.getWM("Restrictions.ashx","q="+encodeURIComponent(query)+"&i=2&m="+c,function(d){$("#selectedrestrictindex").show().html(d);changeFontSize(viewmodus,false)},"html")} function newsearch(a,b,c){currentSort=c;query=a;clearrestrict();loadnewsearch();requestsearch();a=document.getElementById("txtSearch");if(a!=null&&b!=null)a.value=b.replace(/\u00a6/g,'"');setSearchList(query,b);return true}function getDetail(a,b){var c;if(b==1)c=res1;else if(b==3)c=res3;if($.inArray(a,c.arrMedienID)>-1)c.getDetail($.inArray(a,c.arrMedienID));else{if(res3==null)res3=new OpacResult("",3,0);myFormStatus=10;res3.getDetailSingle(a)}} function sortchanged(){ResetTimer();currentSort="";var a=document.getElementById("cboSort");if(a!=null)currentSort=a.value;res1.currentPage=0;res1.arrMedienID=[];res1.getResult();if(res2!=null){res2.currentPage=0;res2.arrMedienID=[];res2.getResult()}} function changeZweigSt(){var a=$("#selZWS").val(),b="";if(a!=""){$("input[type=hidden]").each(function(){var c="#"+$(this).attr("id").replace("zws","res");if($(this).val()!="|"&&$(c).is(":checked")&&$(this).val().indexOf("|"+a+"|")==-1){if(b=="")b="ACHTUNG: Es gibt Medien, welche keine Exemplare in Zweigstelle '"+$("#selZWS :selected").text()+"' haben:\n";b+="- "+$(this).attr("titel")+"\n"}});b!=""&&alert(b)}} function setSearchList(a,b){var c=document.getElementById("lastsearchlist");if(c!=null){var d=a.replace("'","'"),e=b.replace(/"/g,"\u00a6");e=e.replace("'","'");d="
  • "+b.replace("'","'")+"
  • ";if(c.innerHTML.indexOf('"'+a+'"')<0&&b!="")c.innerHTML+=d}}function searchinsearch(a){query=query==""?encodeURIComponent(a):query+encodeURIComponent("&"+a);loadnewsearch();return false} function addrestrict(a,b){res1.arrRestrict.push(encodeURIComponent(a));res2!=null&&res2.arrRestrict.push(encodeURIComponent(b));hasRestrictChanged=true;loadnewsearch();return false}function removerestrict(a){a=encodeURIComponent(a);for(i=0;i0){ChngFrmStartpage();requestStartPage()}}return true} function loadnew(){document.location=smartCopy==0?queryFixedRestrict!=null&&queryFixedRestrict!=""?"default.aspx?qx="+queryFixedRestrict:"default.aspx":"default.aspx?sc=1"}function setwaitpage(){var a=getImageURL();DesignVersion==0?$(formContentTop).html('

    '+waittext+'

    ').show():$(formContentTop).html('

    '+waittext+'

    ').show();return true} function getImageURL(){return document.URL.search("/de/")>-1||document.URL.search("/fr/")>-1||document.URL.search("/it/")>-1||document.URL.search("/en/")>-1?"../":""}function changeFlag(a,b){$.browser.msie&&$.browser.version.substr(0,1)<8||(b==1?$("#lang"+a+" .languagebutton").attr("src",getImageURL()+"images/header/Flag_"+a+"_23x15.gif"):$("#lang"+a+" .languagebutton").attr("src",getImageURL()+"images/header/Flagoff_"+a+"_23x15.gif"))} function showRestrictions(){$(formRightbar).show();hidedetailbar();$(containerRestrictAvailable).hide();$(containerRestrictActive).hide();if(DesignVersion>0){$(formMain).css("width","592px");$("#trenright").css("width","592px");$("#trenleft").css("width","592px");$(containerRestrictIndex).hide();$(containerRestrictMerkliste).hide();$("#selectedrestrictindex").hide()}} function getrestrictions(){hidedetailbar();requestrestrictions(containerRestrictAvailable,0);if(hasRestrictChanged){requestrestrictions(containerRestrictActive,1);hasRestrictChanged=false}return true}function requestrestrictions(a,b){$(a).hide();if(b==0||res1.arrRestrict.length>0){var c=res1.querycomplet;$.getWM("Restrictions.ashx","act="+b+"&q="+c,function(d){loadrestrictions(d,a,c)},"html")}return true} function loadrestrictions(a,b,c){if(c==res1.querycomplet&&myFormStatus<=1){if(a==null||a=="")$(b).hide();else{$(b).show().html(a);Rounded("div"+b,roundedBackColor,roundedForeColor)}myFormStatus==0&&DesignVersion>0&&changeMainHeightFromRestriction()}else if(myFormStatus==5){$(containerRestrictIndex).show().html(a);$("#txtIndex").live("keypress",function(d){if((d.keyCode?d.keyCode:d.which)==13){$("#cmdIndexSearch").click();return false}else return true})}changeFontSize(viewmodus,false)} function backtoresult(){ResetTimer();if(myFormStatus==8||myFormStatus==10||myFormStatus==11)myFormStatus=1;if(myFormStatus==9)requestMerkliste();else{res1.getResult();res2!=null&&res2.getResult();hasRestrictChanged=true;ChngFrmResult();getrestrictions()}} function backtoprevious(){ResetTimer();if(res1.currentRowNr>0){myFormStatus=2;res1.requestDetail();if(DesignVersion>0){refreshButtons("cmdGeneralSearch");$("#cmdGeneralSearch").removeClass("tab_a").addClass("tab_a_active")}}else if(res1.maxRowNr>0){backtoresult();if(DesignVersion>0){refreshButtons("cmdGeneralSearch");$("#cmdGeneralSearch").removeClass("tab_a").addClass("tab_a_active")}}else{$(formContentTop).html(" ");$(formContentSearch).hide();getrestrictions();if(DesignVersion>0){requestStartPage(); ChngFrmStartpage()}}$(formTipMedien).html("").hide()}function GetMainAction(a,b){DesignVersion>0&&$.getWM("MainAction.ashx","f="+a+"&m=1&q="+encodeURIComponent(res1.querycomplet),function(c){loadmainaction(c,b)},"html")}function loadmainaction(a,b){$("#mainaction").show().html(a);$("#cmdPrinterDlg").click(GetDialogPrinter);$("#cmdMailDialog").click(GetDialogEmail);this.currentInstance=b}function focusDlgExportTrefferliste(a){$("#chkFromToPage"+a).attr("checked",true)} function reservieren(){ResetTimer();var a="Reservieren.aspx?id="+(myFormStatus==2?res1.getCurrentDetailId():res3.getCurrentDetailId())+"&wm="+wmSessionID;window.open(a,"new_window","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, width=520, height=550")}function GastReservierung(){$dialog.dialog("close");reservieren()} function reservationRequest(){correctHeightLanOpac(2);if(myKonto!=null&&myKonto.isLoggedIn)requestReservation(0);else{ResetTimer();if(myKonto==null)myKonto=new Konto;myKonto.resqueued=true;myKonto.requestLogin("","0",0)}return true} function allesReservierenRequest(){ResListIDs=AddListIDs;if(myKonto!=null&&myKonto.isLoggedIn){if(res3!=null){myFormStatus=11;for(var a=AddListIDs.split(","),b="",c=0;c20)b+="XI="+d+"+"}if(b.length>20){res3.querycomplet=encodeURIComponent(b.substring(0,b.length-1));res3.instance=4;res3.currentPageBegin=0;res3.currentRowNr=-1;res3.buildQuery();res3.getResult()}}}else{ResetTimer();if(myKonto==null)myKonto=new Konto;myKonto.allresqueued=true;myKonto.showKonto= false;myKonto.requestLogin("","0",0)}return true}function GoReservation(){var a=0;$("input[type=checkbox]").each(function(){$(this).is(":checked")&&a++});var b=$("#selZWS").length>0?$("#selZWS").val():"";a>0?requestReservation(2,b):alert(noreservation)}function allesReservierenMessage(a){$(formContentTop).show().html(a)} function reservationCommit(){var a=$("#resnote").val();if($("#selZWS").length!=0){var b=$("#selZWS").val();$dialog.dialog("close");requestReservation(1,b,a)}else{$dialog.dialog("close");requestReservation(1,"",a)}} function requestReservation(a,b,c){ResetTimer();var d="";if(a==2){d=ResListIDs;a="id="+d+"&aid="+wmSessionID+"&commit=1&zws="+b;$.postWM(res1.urlBase+"reservation.ashx",a,function(e){allesReservierenMessage(e)},"html")}else{d=myFormStatus==2?res1.getCurrentDetailId():res3.getCurrentDetailId();a="id="+d+"&aid="+wmSessionID+"&commit="+(a==1?"1":"0")+"&zws="+(typeof b=="undefined"?"":b)+"&n="+(typeof c=="undefined"?"":c);$.postWM(res1.urlBase+"reservation.ashx",a,$.dialog,"json")}return true} function cancelReservation(){ResetTimer();var a;a=document.getElementById("commitaction");if(a!=null)a.style.display="none";a=document.getElementById("detailfunctions");if(a!=null)a.style.display="block"}function GetArtBild1(a){var b=document.getElementById("MedBild"+a);if(b!=null)b.style.display="inline";b=document.getElementById("amazonurl"+a);if(b!=null)b.style.display="none";b=document.getElementById("coverImage"+a);if(b!=null)b.style.display="none"} function GetArtBild2(a,b){if(a==null||a.width==1)GetArtBild1(b);else a.width==0&&setTimeout(function(){GetArtBild3(a,b)},200)}function GetArtBild3(a,b){if(a==null||a.width==1)GetArtBild1(b)}function setShowSelect(){$.browser.msie&&$.browser.version.substr(0,1)<7&&$("select").each(function(){$(this).show()});correctHeightLanOpac(0)} function ShowAllRestrict(a,b){ResetTimer();var c=document.getElementById(a);lanOpacHeight=0;if(c!=null){var d=c.childNodes;if(d!=null){c=c.childNodes.length-1;d[c].style==null&&c--;for(i=b;i0){$("#searchInputStart").live("keypress",function(b){if((b.keyCode?b.keyCode:b.which)==13){SuchenStart();return false}else return true});$("#searchTerm1").live("keypress",function(b){if((b.keyCode?b.keyCode:b.which)==13){SuchenStart();return false}else return true});$('input[id="searchInputStart"]').placeholder({offClass:"inputOff",onClass:false});$("#txtUserName").focus(); $("#txtPassword").focus();$("#searchInputStart").focus()}$("#txtSearch").focus()}function loginButtonClick(){ResetTimer();if(myKonto==null)myKonto=new Konto;myKonto.resqueued=false;myKonto.isLoggedIn?myKonto.logoffKonto():myKonto.logon("");return true} function loginDlgButtonClick(a){ResetTimer();var b=false;if($("#loginOpenID").length>0)b=$("#loginOpenID").is(":hidden")?false:true;if(b){a=$("#txtOpenID").val().indexOf("http://")==-1&&$("#txtOpenID").val().indexOf("https://")==-1?"http://"+$("#txtOpenID").val():$("#txtOpenID").val();b=$("#chkAutoLogin1").is(":checked")?1:0;document.location="default_opac.aspx?openid="+encodeURIComponent(a)+"&auto="+b}else{if(myKonto==null)myKonto=new Konto;myKonto.logon(a)}$dialog.dialog("close");return true} function Konto(){this.showProfile=this.showKonto=this.allresqueued=this.resqueued=this.isLoggedIn=false;this.username=""}function GetDialogEmailPwd(){ResetTimer();$dialog.dialog("close");$.postWM("konto.ashx","rsa=&konto=5",$.dialog,"json");return true} function EmailPwd(){ResetTimer();var a=document.getElementById("txtEmailLost");if(a==null)return false;a=a.value+"|"+randomString();$dialog.dialog("close");initKey();a=encryptedString(key,a);$.postWM("konto.ashx","rsa=&konto=6&email="+a,$.dialog,"json");return true} Konto.prototype={logon:function(a){ResetTimer();var b=$("#txtUserName"+a).val();if(!b||b.length<1){this.requestLogin("","0",0);return true}var c=$("#txtPassword"+a).val();if(c.length<4){alert($("#txtPassword"+a).attr("title"));$("#txtPassword"+a).focus();return false}if(c.length<6)c=c.toLowerCase();$("#txtPassword"+a).val("");var d=$("#cboStammBiblio"+a).val();d||(d="");b=b+"|"+c+"|"+d+"|"+randomString();if(isLan!=1){initKey();b=encryptedString(key,b)}a=$("#chkAutoLogin"+a).is(":checked")?1:0;if(myKonto.requestLogin(b, "",a))return true;return false},logoffKonto:function(){this.requestLogin("","9",0);this.showProfile=this.resqueued=this.isLoggedIn=false;this.changeUI();wmSessionID="";ResetTimer();backtoprevious();return true},changeUI:function(){var a;if(this.isLoggedIn){a=document.getElementById("fieldsLogin");if(a!=null)a.style.display="none";a=document.getElementById("cmdKonto");if(a!=null)if(this.showKonto)if(DesignVersion==0){a.style.display="list-item";a.onclick=showKonto}else{$("#cmdAccSummary").click(showKonto).show(); $("#cmdChangePwd").show();$("#logintext").html(myKonto.username).show();$("#txtPassword").hide();$("#txtUserName").hide();$("#divLogout").show();myFormStatus==4&&showKonto()}else if(DesignVersion==0)a.style.display="none";else{$("#cmdAccSummary").hide();$("#logintext").html(myKonto.username).show();$("#txtPassword").hide();$("#txtUserName").hide();$("#divLogout").show()}if(this.showProfile){a=document.getElementById("cmdChangePwd");if(a!=null){a.onclick=showChangePwd;a.style.display=DesignVersion== 0?"list-item":"inline"}}a=document.getElementById("cmdLogoff");if(a!=null){a.onclick=loginButtonClick;a.style.display=DesignVersion==0?"list-item":"inline"}a=document.getElementById("cmdLogin");if(a!=null)a.style.display="none";a=document.getElementById("txtUserName");if(a!=null)a.value=""}else{a=document.getElementById("fieldsLogin");if(a!=null)a.style.display="inline";a=document.getElementById("cmdKonto");if(a!=null&&DesignVersion==0)a.style.display="none";a=document.getElementById("cmdChangePwd"); if(a!=null)a.style.display="none";a=document.getElementById("cmdLogoff");if(a!=null)a.style.display="none";a=document.getElementById("cmdLogin");if(a!=null&&DesignVersion==0)a.style.display="list-item";if(DesignVersion>0){$("#divLogout").hide();$("#txtPassword").show();$("#txtUserName").show();$("#cmdLogin").show();$("#logintext").html("Benutzerkonto").show()}}return true},requestLogin:function(a,b,c){ResetTimer();a={rsa:a,konto:b,auto:c};if(typeof sessionid!="undefined")a=$.extend(a,{sessionid:sessionid}); switch(b){case "":$.postWM2("konto.ashx",a,myKonto.loginResponse,"json");break;case "0":if(this.resqueued||this.allresqueued)a=$.extend(a,{res:1});$.postWM2("konto.ashx",a,$.dialog,"json");break;case "9":$.postWM2("konto.ashx",a,null,"text");break;default:$.postWM2("konto.ashx",a,function(d){loginKontoResponse(d)},"html");break}return true},loginResponse:function(){var a={success:false,ID:""};for(i=arguments.length-1;i>=0;i--)a=$.extend(a,arguments[i]);if(!a.success||a.ID.length<20){$.dialog(a);return true}wmSessionID= a.ID;myKonto.isLoggedIn=a.success;myKonto.showProfile=a.Profile;myKonto.showKonto=a.Konto;myKonto.username=a.username;if(a.OpacRecht&&myKonto.resqueued==false){hasRestrictChanged=true;getrestrictions()}if(myKonto.resqueued)reservationRequest();else if(myKonto.allresqueued)allesReservierenRequest();else if(myKonto.showProfile)requestKonto("1");else if(res1.currentRowNr>=0)res1.requestDetail();else this.isLoggedIn=true;myKonto.changeUI();return true}};var adresseID; function showKonto(){if(DesignVersion==0)requestKonto(1);else{if(myKonto==null)myKonto=new Konto;if(myKonto.isLoggedIn!=true){myKonto.resqueued=false;myKonto.logon("");$.browser.msie&&$.browser.version.substr(0,1)<7&&$("select").each(function(){$(this).hide()})}else{refreshAccButtons();$("#cmdAccSummary a").css("font-weight","bold");requestKonto(1)}}return true}function showChangePwd(){requestKonto(2);if(DesignVersion>0){refreshAccButtons();$("#cmdChangePwd a").css("font-weight","bold")}} function showAccSummary(){requestKonto(2);if(DesignVersion>0){refreshAccButtons();$("#cmdAccSummary a").css("font-weight","bold")}}function showAccProfil(){requestKonto(2)}function showAccMessage(){requestKonto(2)}function showAccMemo(){requestKonto(2);if(DesignVersion>0){refreshAccButtons();$("#cmdAccMemo a").css("font-weight","bold")}}function refreshAccButtons(){$("#cmdChangePwd a").css("font-weight","");$("#cmdAccSummary a").css("font-weight","")} function requestKonto(a){ResetTimer();if(a==null)a=1;$.postWM(res1.urlBase+"konto.ashx","aid="+wmSessionID+"&konto="+a,function(b){loginKontoResponse(b)},"html");return true} function loginKontoResponse(a){ResetTimer();$(formContentTop).html(a).show();ChngFrmKonto();hidedetailbar();$("img").each(function(){$(this).attr("title",$(this).attr("alt"))});$("img.buttonInfo").click(function(){$.dialog({title:"Info",body:$(this).attr("alt"),autoOpen:true,modal:true,buttons:{OK:function(){$(this).dialog("close")}}})});$("img.buttonRenew").click(Renew_Click);$("img.buttonCheckin").live("click",Checkin_Click);$("#txtAusleihe").keypress(function(b){(b.keyCode?b.keyCode:b.which)== 13&&Checkout_Click()});$("#cmdAusleihe").click(Checkout_Click);if(DesignVersion>0){changeMainHeightFromResult();changeFontSize(viewmodus,false)}return true}function Renew_Click(){ResetTimer();$(this).attr("src",$(this).attr("src").replace(".png","d.png"));$(this).unbind("click");var a={id:$(this).parents("tr").attr("id"),commit:0,art:1};$.postWM2("ausleihe.ashx",a,$.OnVerlResponse,"json")} function RenewAll_Click(){ResetTimer();var a=0;$("#tableKontoAuszug tbody tr").each(function(){var b=$(this).attr("id");if(b.length>0){var c="#"+b+" img.buttonRenew";if($(c).length>0){$(c).attr("src",$(c).attr("src").replace(".png","d.png"));$(c).unbind("click");$.postWM2("ausleihe.ashx",{id:b,commit:1,art:11},$.OnVerlResponse,"json")}else a=1}});a==1&&$.postWM2("ausleihe.ashx",{art:12},$.OnVerlResponse,"json")} function Checkin_Click(){ResetTimer();var a={id:$(this).parents("tr").attr("id"),commit:0,art:2};$.postWM2("ausleihe.ashx",a,$.OnCheckinResponse,"json")}function Checkout_Click(){ResetTimer();var a=$("#txtAusleihe").val();a!=null&&a.length>0&&$.postWM2("ausleihe.ashx",{id:a,commit:1,art:3},$.OnCheckoutResponse,"json")} function ChangePwd(){ResetTimer();var a="aid="+wmSessionID+"&konto=4",b=document.getElementById("txtPwdOld"),c;if(b!=null){c=document.getElementById("errPwdOld");if(b.value.length==0){c.style.display="block";b.focus();return false}c.style.display="none";a+="&pwdo="+encodeURIComponent(b.value)}b=document.getElementById("txtPwd1");if(b!=null){c=document.getElementById("errPwd1");if(b.value.length<6){c.style.display="block";b.focus();return false}c.style.display="none";a+="&pwdn="+encodeURIComponent(b.value)}var d= document.getElementById("txtPwd2");if(d!=null){c=document.getElementById("errPwd2");if(d.value!=b.value){c.style.display="block";d.focus();return false}c.style.display="none"}b=document.getElementById("txtEmail");if(b!=null)a+="&email="+b.value;$.postWM(res1.urlBase+"konto.ashx",a,function(e){changePwdResponse(e)},"text");return true} function changePwdResponse(a){ResetTimer();if(a.length>0)switch(a.substring(0,1)){case "1":backtoprevious();break;case "2":a=document.getElementById("txtPwdOld");if(a!=null){a.value="";document.getElementById("errPwdOld").style.display="block";a.focus();return true}break}return true}function PwdKeyPress1(a){ResetTimer();if((a.keyCode?a.keyCode:a.which)==13){loginDlgButtonClick("1");return false}return true}var maxTimer=99999,myTimer=0,isReset=false; function OpacTimer(){if(isReset){myTimer+=1;if(myTimer>=maxTimer){myTimer=0;loadnew();isReset=false}}}function ResetTimer(){myTimer=0;isReset=true}function ResetTimerEvent(){myTimer=0;isReset=true}var $dialog; (function(a){a.dialog=function(){var b=a.extend(a.ui.dialog.defaults,{title:"",body:"",zIndex:3999,close:function(){$dialog.remove();setShowSelect()}});for(i=arguments.length-1;i>=0;i--)b=a.extend(b,arguments[i]);$dialog=a('
    '+b.body+"
    ").appendTo("body");$dialog.dialog(b);if(a("#txtPassword1").length!=0){a("#txtPassword1").keypress(function(c){if((c.keyCode?c.keyCode:c.which)==13){loginDlgButtonClick("1");return false}else return true});a("#txtUserName1").focus()}if(b.verbund!= null){a("#cboStammBiblio1").html(parseComboData(b.verbund,b.biblionr));a("#txtUserName1").focus()}}})(jQuery);function parseComboData(a,b){if(!a)return null;for(var c="",d=a.split(";"),e=0;e'+f[1]+""}}return c} function GetDialogPrinter(){ResetTimer();correctHeightLanOpac(2);if(myFormStatus!=4){myPrinter=new Printer(currentInstance);myPrinter.showDialog()}else popUpWindow("exportresult.ashx?p=3&wm="+wmSessionID,"Aktuelle_Seite_drucken");return true}function printDlgButtonClick(a){ResetTimer();myPrinter!=null&&myPrinter.print(a)&&$dialog.dialog("close");return true}function Printer(a){this.PageTo=this.PageFrom="0";this.ResultSelect=false;this.ResultPresentation=this.ResultFormat=0;this.id=a} Printer.prototype={showDialog:function(){ResetTimer();this.PageFrom=this.id==1?res1.currentPage:this.id==2?res2.currentPage:this.id==3?res3.currentPage:"10";if(myPrinter.requestPrinter("0"))return true;return false},print:function(a){ResetTimer();if($("#chkCurrentPage"+a).is(":checked")){this.ResultSelect=false;this.ResultPresentation=$("#chkShortPresentation"+a).is(":checked")?1:2}else if(myFormStatus==1||myFormStatus==6||myFormStatus==8){this.ResultSelect=true;this.ResultPresentation=$("#chkShortPresentation"+ a).is(":checked")?1:2;var b=$("#txtPrintPageFrom"+a).val();if(b.length==0){alert($("#lblFromToPage"+a).html().replace(" ","")+": "+$("#txtPrintPageFrom"+a).attr("errorempty"));$("#txtPrintPageFrom"+a).focus();return false}else if(isNaN(b)){alert($("#lblFromToPage"+a).html().replace(" ","")+": "+$("#txtPrintPageFrom"+a).attr("errornumber"));$("#txtPrintPageFrom"+a).focus();return false}else this.PageFrom=parseInt(b)-1;b=$("#txtPrintPageTo"+a).val();if(b.length==0){alert($("#lblPrintPageTo"+ a).html()+": "+$("#txtPrintPageTo"+a).attr("errorempty"));$("#txtPrintPageTo"+a).focus();return false}else if(isNaN(b)){alert($("#lblPrintPageTo"+a).html()+": "+$("#txtPrintPageTo"+a).attr("errornumber"));$("#txtPrintPageTo"+a).focus();return false}else this.PageTo=parseInt(b)-1;if(this.PageTo=0;i--)b=a.extend(b,arguments[i]);if(b.confirmed){if(b.success){a("#"+b.auslid+" td.cellAuslDat").text(b.msg).css({"background-color":"lightgreen"});a("#"+b.auslid+" img.buttonRenew").removeClass("buttonRenew")}}else{b.noDlg||a.dialog(b);if(!b.success){var c="#"+b.auslid+" img.buttonRenew";a(c).attr("title",b.title);a(c).attr("src",a(c).attr("src").replace("renewd",b.wait?"wait":"info"));a(c).click(function(){a.dialog({title:"Info",body:b.body, autoOpen:true,modal:true,buttons:{OK:function(){a(this).dialog("close")}}})});a(c).removeClass("buttonRenew")}}};a.OnCheckinResponse=function(){var b={success:false,confirmed:false,auslid:""};for(i=arguments.length-1;i>=0;i--)b=a.extend(b,arguments[i]);if(b.confirmed&&b.success){if(a.browser.msie&&a.browser.version.substr(0,1)==8)requestKonto(1);else{a("#"+b.auslid).remove();var c=a("#tableKontoAuszug tbody tr").length;a("#cntKonto").text(c);c==0&&a("#tableKontoAuszug").hide()}b.msg!=""&&a.dialog(b)}else a.dialog(b)}; a.OnCheckoutResponse=function(){var b={success:false,confirmed:false,row:""};for(i=arguments.length-1;i>=0;i--)b=a.extend(b,arguments[i]);if(b.confirmed&&b.success)if(a.browser.msie&&a.browser.version.substr(0,1)==8)requestKonto(1);else{a("#tableKontoAuszug tbody").append(b.row);b=a("#tableKontoAuszug tbody tr").length;a("#cntKonto").text(b);b>0&&a("#tableKontoAuszug").show();a("#txtAusleihe").val("")}else a.dialog(b)}})(jQuery); function requestMerkliste(){myFormStatus=8;for(var a=AddListIDs.split(","),b="",c=0;c20)b+="XI="+d+"+"}if(res3==null)res3=new OpacResult("",3,0);else{res3.instance=3;res3.clear()}if(b.length>20){res3.querycomplet=encodeURIComponent(b.substring(0,b.length-1));res3.buildQuery();res3.getResult()}else{$(formContentTop).show().html("

    "+nomerkliste+"

    ");$(formMainAction).hide();$(formRightbar).hide();ChngFrmMerkliste()}} function requestsearch(){ResetTimer();getrestrictions();myFormStatus=1;ChngFrmResult();DesignVersion>0&&changeMainHeightFromResult();res1.arrRestrict.length!=0&&$(containerRestrictActive).show();return true} function requestexpertsearch(){ResetTimer();ChngFrmErwSearch();var a=$(formContentSearch);if(a.children("*").length>0)a.show();else{var b="l=";b+=document.URL.search("/de/")>-1?"d":document.URL.search("/fr/")>-1?"f":document.URL.search("/en/")>-1?"e":document.URL.search("/it/")>-1?"i":"d";a.load("Expert.ashx",b,showexpertsearch).show()}return true}function requestnetworksearch(){ResetTimer();ChngFrmNetSearch();return true} function requestindex(){ResetTimer();ChngFrmIndex();if($(formContentIndexSearch).html().length>15){$(formContentIndexSearch).show();$(containerRestrictIndex).show()}else{getRestrictionIndex("",6,1);$(formMain).css("height","")}changeMainHeightFromResult();changeFontSize(viewmodus,false);return true} function showexpertsearch(){if(typeof IsVerbundCatalog=="undefined"){EnableAutoComplete("1");EnableAutoComplete("2");EnableAutoComplete("3")}$('#divErwSearchRestrictMain div[name="rmc"] label').addClass("erwSearchCheckbox");$("#divErwSearchRestrictMain input").click(onChangeErwSearchRestrict);$.browser.msie&&$.browser.version.substr(0,1)<7?$("#divErwSearchRestrictMain").accordion({active:false,collapsible:true,autoHeight:true}):$("#divErwSearchRestrictMain").accordion({autoHeight:false});$("#divErwSearch1 input").keyup(function(a){a.keyCode== 13&&$&&$("#cmdErwSuche1").click()});changeFontSize(viewmodus,false)}function EnableAutoComplete(a){$("#searchInput"+a).autocomplete("autocomplete.ashx",{delay:10,minChars:999,matchSubset:1,matchContains:1,cacheLength:1,autoFill:true,maxItemsToShow:10});OnSearchTermChanged(a)} function OnSearchTermChanged(a){var b=$("#searchTerm"+a).val();switch(b){case "4":$("#searchInput"+a)[0].autocompleter.setOptions({autoFill:true,minChars:1,matchContains:0});break;case "2":case "6":case "7":$("#searchInput"+a)[0].autocompleter.setOptions({autoFill:true,minChars:3,matchContains:0});break;case "5":case "8":$("#searchInput"+a)[0].autocompleter.setOptions({autoFill:false,minChars:3,matchContains:1});break;default:$("#searchInput"+a)[0].autocompleter.setMinChars(999);break}$("#searchInput"+ a)[0].autocompleter.setExtraParams({t:b})} function SuchenStart(){ResetTimer();query="erw:";var a=$("#searchInputStart").val();if(a.length<=0){$("#searchInputStart").focus();alert(nosearchtext);return true}else{var b=/[0-9]+(\.)$/,c=/[0-9]/;if(a.length<8&&typeof IsVerbundCatalog=="undefined"&&b.test(a)){myFormStatus=2;return res1.getDetailSingle(a.replace(".",""))}else if(isISBN(a))query+=encodeURIComponent("0|9|"+a);else{if(!c.test(a))if(a.length<2){alert(nosearchtext);$("#searchInputStart").focus();return true}query+=encodeURIComponent("0|"+ $("#searchTermStart").val()+"|"+a)}setSearchList(query,$("#searchInputStart").val());loadnewsearch();showRestrictions()}}function SuchenErw(){ResetTimer();clearrestrict();$("#txtSearch").val("");query="erw:";$(".searchInput").each(getSearchInput);$("#divErwSearchRestrictMain > div").each(getErwRestricts);if(getErwFromTo("year","22",2)&&getErwFromTo("date","16",1))if(query.length>4){$("#content-search").hide();loadnewsearch();showRestrictions()}} function changeMainHeightFromRestriction(){if($(formMain).height()<$(formRightbar).height())$(formMain).css("height",$(formRightbar).height()+30+"px");else $(formRightbar).height()<660&&$(formMain).css("height","660px");correctHeightLanOpac(1)} function changeMainHeightFromDetail(){if($("#detailcontent table").height()!=null){correctHeightLanOpac(0);var a=$("#detailtable").height();if($("#detailheader").length>0&&$("#detailheader").height()!=null)a+=$("#detailheader").height();if($(".exemplartable:not(#baendetable)").length>0&&$(".exemplartable:not(#baendetable)").height()!=null)a+=$(".exemplartable:not(#baendetable)").height()+38;if($("#baendetable").length>0&&$("#baendetable").height()!=null)a+=$("#baendetable").height();if($(formTipMedien).is(":hidden")&& a>600)$(formMain).css("height",a+100+"px");else $(formTipMedien).is(":visible")?$(formMain).css("height",a+10+"px"):$(formMain).css("height","")}else $(formMain).css("height","")} function changeMainHeightFromResult(){var a="";correctHeightLanOpac(0);if(myFormStatus==4){var b=0;a=0;if($("#kontoauszugcontent #tableKontoAuszug").length!=0)b=$("#kontoauszugcontent #tableKontoAuszug").height();if($("#kontoauszugcontent2 #tableReservationen").length!=0)a=$("#kontoauszugcontent2 #tableReservationen").height();b+=a+250;$(formMain).height()850?$(formMain).css("height",a+"px"):$(formMain).css("height","850px")}else $(formMain).css("height","850px")}} function addList(a,b){if(myFormStatus!=8){if(a==0&&res1.currentRowNr>-1)a=res1.currentRowNr;if(AddListIDs.search(","+res1.arrMedienID[a])>-1){AddListIDs=AddListIDs.replace(","+res1.arrMedienID[a],"");$(b).attr("src",imagePlus)}else{AddListIDs+=","+res1.arrMedienID[a];$(b).attr("src",imageMinus)}}else{if(a==0)a=res3.currentRowNr;if(AddListIDs.search(","+res3.arrMedienID[a])>-1){AddListIDs=AddListIDs.replace(","+res3.arrMedienID[a],"");$(b).attr("src",imagePlus)}else{AddListIDs+=","+res3.arrMedienID[a]; $(b).attr("src",imageMinus)}}}function resList(a,b){var c=$("#totalgebuehr").html().replace("SFr. ","");c=parseFloat(c);if(ResListIDs.search(","+a)>-1){ResListIDs=ResListIDs.replace(","+a,"");c-=parseFloat(b)}else{ResListIDs+=","+a;c+=parseFloat(b)}c==Number.NaN||c=="0"?$("#totalgebuehr").html("SFr. 0.00"):$("#totalgebuehr").html("SFr. "+c.toFixed(2))}function addListDetail(){addList(0,"#imgDetailMerkliste")} function setMerklisteActive(){if(smartCopy==0)for(var a=AddListIDs.split(","),b=0;b

    "+nomerkliste+"

    ");$(containerRestrictMerkliste).hide();$(formMainAction).hide()} function getSearchInput(a){a++;var b=$(this).val();if(b!=""){query+=a==1?encodeURIComponent("0|"):encodeURIComponent("$"+$("#searchConcat"+a).val()+"|");query+=isISBN(b)?encodeURIComponent("9|"+b):encodeURIComponent($("#searchTerm"+a).val()+"|"+b)}} function getErwRestricts(){var a=$(this).attr("id");if(!(a==null||a.length==0)){a=a.substring(2,a.length);var b=$("#rma"+a+" input:checked").val();if(b!="0"){b=b=="1"?"2":"0";var c=$("#rmc"+a+" input:checked").map(function(){return $(this).val()}).get().join(",");c==null||c==""||(query+=encodeURIComponent("$"+b+"|"+a+"|"+c))}}} function getErwFromTo(a,b,c){var d,e,f,h;if(c==1){d=RegExp("^([0-3]{0,1})([0-9]{1})(.)([0-1]{0,1})([0-9]{1})(.)([0-9]{2,4})$","g");e=RegExp("^([0-3]{0,1})([0-9]{1})(.)([0-1]{0,1})([0-9]{1})(.)([0-9]{2,4})$","g");f=nodateformat;h="01.01.1900"}else{d=RegExp("^([0-9]{4})$","g");e=RegExp("^([0-9]{4})$","g");f=noyearformat;h="1000"}if($("#"+a+"InputFrom").length!=0&&$("#"+a+"InputTo").length!=0){var g=$("#"+a+"InputFrom").val();if(g!="")if(d.test(g))if(c==1)if(chkDate(g))query+=encodeURIComponent("$0|"+ b+"|"+g);else{alert(f);return false}else query+=encodeURIComponent("$0|"+b+"|"+g);else{alert(f);return false}a=$("#"+a+"InputTo").val();if(a!="")if(e.test(a)){if(g=="")query+=encodeURIComponent("$0|"+b+"|"+h);if(c==1)if(chkDate(a))query+=encodeURIComponent("|"+a);else{alert(f);return false}else query+=encodeURIComponent("|"+a)}else{alert(f);return false}}return true} function getRestrictionIndex(a,b,c){if(b==0)b=$("#selSuchMedien").val();$.getWM("Restrictions.ashx","q="+encodeURIComponent(a)+"&i="+c+"&m="+b,function(d){loadrestrictions(d,"","")},"html")}function getRestrictionIndexWithStichwort(){$("#txtIndex").val().length>0&&getIndex($("#txtIndex").val())}function getIndex(a){a="i=1&m="+$("#selSuchMedien").val()+"&q="+encodeURIComponent(a);$.getWM("Index.ashx",a,function(b){loadIndex(b)},"html")} function chkDate(a){try{var b=parseInt(a.match(/^[0-9]{1,2}/g)),c=a.match(/\.[0-9]{1,2}\./g),d=parseInt(c[0].replace(/\./g,""));return b>0&&b<=31&&d>0&&d<=12?true:false}catch(e){return false}} function isISBN(a){a=$.trim(a);if(a.indexOf("-")>-1&&a.length==13){var b=/\d{1,5}([- ])\d{1,7}\1\d{1,6}\1(\d|X)$/;return b.test(a)?true:false}else if(a.indexOf("-")>-1&&a.length==17){b=/97(?:8|9)([ -])\d{1,5}\1\d{1,7}\1\d{1,6}\1\d$/;return b.test(a)?true:false}else if(a.length==13){b=/\d{1,13}$/;return b.test(a)?(parseInt(a.substr(0,1))*1+parseInt(a.substr(1,1))*3+parseInt(a.substr(2,1))*1+parseInt(a.substr(3,1))*3+parseInt(a.substr(4,1))*1+parseInt(a.substr(5,1))*3+parseInt(a.substr(6,1))*1+parseInt(a.substr(7, 1))*3+parseInt(a.substr(8,1))*1+parseInt(a.substr(9,1))*3+parseInt(a.substr(10,1))*1+parseInt(a.substr(11,1))*3+parseInt(a.substr(12,1)))%10==0?true:false:false}else return false} function popUpWindow(a,b){if(b=="help"){a+=myFormStatus==0||myFormStatus==3||myFormStatus==5?"?fm="+myFormStatus:"?fm=99";var c="width=620,height=620,top="+(screen.availHeight/2-310)+",left="+(screen.availWidth/2-310)+","}else c=myFormStatus==1||myFormStatus==6||myFormStatus==8?"width=900,height=900,top=10,left=10,":myFormStatus==4?"width=900,height=700,top=10,left=10,":"width=900,height=400,top=10,left=10,";window.open(a,b,c+"scrollbars=yes,resizable=yes,status=no,toolbar=no,menubar=no,location=no").focus()} function onChangeErwSearchRestrict(){ResetTimer();var a=$(this).parent().parent().parent().attr("id");if(!(a==null||a.length==0)){a=a.substring(2,a.length);var b="";if($(this).is(":radio"))if($(this).val()=="0"){$("#rmc"+a+" input").each(function(){this.checked=false});return}else{if($(this).val()=="1")b=$(this).parent().text()+": "}else{var c=$("#rma"+a+" input:checked");if(c.val()=="0")$("#rma"+a+' input[value="2"]').attr("checked",true);else if(c.val()=="1")b=c.parent().text()+": "}b+=$("#rmc"+ a+" label").map(function(){if($(this).children("input").attr("checked"))return $(this).text()}).get().join(", ");$("#restricths"+a).text(b)}} function refreshButtons(a){$(".tab_a").css("font-weight","");$(".tab_b").css("font-weight","");$(".tab_c").css("font-weight","");$(".tab_d").css("font-weight","");$(".tab_a_active").css("font-weight","");$(".tab_b_active").css("font-weight","");$(".tab_c_active").css("font-weight","");$(".tab_d_active").css("font-weight","");$(".tab_a_active").removeClass("tab_a_active").addClass("tab_a");$(".tab_b_active").removeClass("tab_b_active").addClass("tab_b");$(".tab_c_active").removeClass("tab_c_active").addClass("tab_c"); $(".tab_d_active").removeClass("tab_d_active").addClass("tab_d");$("#"+a).css("font-weight","bold")}function loadIndex(a){$(formContentIndexSearch).html(a).show();changeMainHeightFromResult()} function loadChngFrmResult(){if(DesignVersion>0){if(myFormStatus==1){if(res2!=null){var a=$("#searchresulttitel1 h3").html();if(a!=null){a=a.split("|");$("#cmdErgebnisse").html(a[1]);$("#searchresulttitel1 h3").html(a[0])}else $("#cmdErgebnisse").html("");networkSearch.length>0?$("#cmdVerbundSearch").html(networkSearch).show():$("#cmdVerbundSearch").html("").show()}if(res1.currentPage==0&&res1.currentRowNr==-1&&res1.maxRowNr==0)changeMainHeightFromResult();else{setMerklisteActive();$.browser.msie&& $.browser.version.substr(0,1)<7&&getrestrictions()}setTitle("")}if($("#searchnavigation1").html()!=null&&$("#searchnavigation1").html().length>20){$("#searchresultnav1").html("");$("#searchnavigation1").clone().css("text-align","left").appendTo("#searchresultnav1")}if($("#searchnavigation2").html()!=null&&$("#searchnavigation2").html().length>20){$("#searchresultnav2").html("");$("#searchnavigation2").clone().css("text-align","left").appendTo("#searchresultnav2")}$("#newdetailnavigation").hide(); changeFontSize(viewmodus,false);$(formTipMedien).html("").hide();changeMainHeightFromResult();setTimeout(changeMainHeightFromResult,400)}} function loadChngFrmDetail(a,b){if(DesignVersion>0){$(formReiterbalk).hide();$(formReiterbalkAcc).hide();$("#restrictheader").hide();if($("#detailnavigation").html()!=null){$("#detailnavigation >*").clone().appendTo("#newdetailnavigation");$("#content-top #detailnavigation").html("");$("#content-bottom #detailnavigation").html("");$("#newdetailnavigation").show();myFormStatus==10&&res1.currentRowNr==-1&&$("#newdetailnavigation").hide()}if(typeof IsVerbundCatalog=="undefined"&&(myFormStatus==2||myFormStatus== 9||myFormStatus==10))GetScrollBox(b);else{changeMainHeightFromDetail();changeFontSize(viewmodus,false)}AddListIDs.search(","+b)>-1?$("#imgDetailMerkliste").attr("src",imageMinus):$("#imgDetailMerkliste").attr("src",imagePlus);GetMainAction(2,a)}$("#slick-toggle").click(function(){$("#slickbox").show();$(this).hide();changeMainHeightFromDetail();return true})} function ChngFrmStartpage(){ResetTimer();refreshButtons("cmdGeneralSearch");$("#cmdGeneralSearch").removeClass("tab_a").addClass("tab_a_active");myFormStatus=0;$(formContentSearch).hide();$("#newdetailnavigation").hide();$(formReiterbalk).hide();$(formReiterbalkAcc).hide();$(formMainAction).hide();$(formContentBottom).html("").show();$(formContentTop).html("").show();$(formTipMedien).html("").hide();showRestrictions();$(containerRestrictAvailable).show();if(res1.querycomplet!="")if(res1.maxRowNr== 0&&res1.currentRowNr==0)search();else if(res1.maxRowNr>=0){res1.currentRowNr=0;res1.currentPage=0;backtoresult()}else requestStartPage();else{requestStartPage();changeMainHeightFromRestriction()}} function ChngFrmResult(){if(myFormStatus==4){DesignVersion==0&&$("#content").css("margin-right","200px");myFormStatus=1}if(myFormStatus==3||myFormStatus==2||myFormStatus==0)myFormStatus=1;else if(myFormStatus==7)myFormStatus=6;if(myFormStatus==1){$(formContentBottom).hide();$(formContentSearch).hide();$(formContentTop).show();if(DesignVersion>0){var a=$("#searchresulttitel1 h3").html();if(a!=null&&a.indexOf("|")>-1){a=a.split("|");$("#cmdErgebnisse a").html(a[1]);$("#searchresulttitel1 h3").html(a[0])}$("#cmdErgebnisse").removeClass("subtab_a_l").addClass("subtab_a_r"); $("#switcher").removeClass("subtab_b_l").addClass("subtab_b_r");$("#cmdVerbundSearch").removeClass("subtab_c_l").addClass("subtab_c_r");GetMainAction(1,1)}}else{$(formContentTop).hide();$(formContentBottom).show();DesignVersion>0&&GetMainAction(6,2)}if(DesignVersion>0){res2!=null&&$(formReiterbalk).show();$("#restrictheader").show();$(formReiterbalkAcc).hide();$(formContentIndexSearch).hide();showRestrictions();$(containerRestrictAvailable).show();refreshButtons("cmdGeneralSearch");$("#cmdGeneralSearch").removeClass("tab_a").addClass("tab_a_active")}} function ChngFrmDetail(){DesignVersion==0&&$("#content").css("margin-right","200px");if(DesignVersion>0){$(formRightbar).show();showRestrictions()}if(myFormStatus==1)myFormStatus=2;else if(myFormStatus==6)myFormStatus=7;else if(myFormStatus==8)myFormStatus=9;$(formContentSearch).hide();$(formContentBottom).hide();$(formContentIndexSearch).hide();$(containerRestrictActive).hide();$(containerRestrictAvailable).hide()} function ChngFrmErwSearch(){myFormStatus==4&&DesignVersion==0&&$("#content").css("margin-right","200px");myFormStatus=3;$(formContentTop).hide();$(formContentBottom).hide();if(DesignVersion>0){$(formTipMedien).html("").hide();$(formRightbar).hide();$(formReiterbalk).hide();$(formReiterbalkAcc).hide();$(formContentIndexSearch).hide();$(formMainAction).hide();$("#newdetailnavigation").hide();$(formMain).css("width","792px");$("#trenright").css("width","792px");$("#trenleft").css("width","792px");refreshButtons("cmdProfiSearch"); $("#cmdProfiSearch").removeClass("tab_b").addClass("tab_b_active");setTitle("");changeFontSize(viewmodus,false);changeMainHeightFromResult()}else{$(containerRestrictActive).hide();$(containerRestrictAvailable).hide()}} function ChngFrmKonto(){myFormStatus=4;$(formContentSearch).hide();$(formContentBottom).hide();if(DesignVersion>0){refreshButtons("cmdKonto");$(".tab_d").length==0?$("#cmdKonto").removeClass("tab_a").addClass("tab_a_active"):$("#cmdKonto").removeClass("tab_d").addClass("tab_d_active");$(formRightbar).hide();$(formMainAction).hide();$(formReiterbalk).hide();$(formContentIndexSearch).hide();$(formTipMedien).html("").hide();$("#newdetailnavigation").hide();$(formMain).css("width","792px");$(formMain).css("height", "780px");$("#trenright").css("width","792px");$("#trenleft").css("width","792px");$(formReiterbalkAcc).show();GetMainAction(4,1)}else{$(containerRestrictActive).hide();$(containerRestrictAvailable).hide();$(formContent).css("margin-right","0px")}} function ChngFrmIndex(){myFormStatus=5;$(formTipMedien).html("").hide();$(formContentTop).hide();$(formContentBottom).hide();$(formContentSearch).hide();$(formMainAction).hide();$(formReiterbalk).hide();$(formReiterbalkAcc).hide();showRestrictions();$("#newdetailnavigation").hide();refreshButtons("cmdIndex");$("#cmdIndex").removeClass("tab_c").addClass("tab_c_active");setTitle("")} function ChngFrmMerkliste(){$(formContentBottom).hide();$(formContentSearch).hide();$(formContentIndexSearch).hide();$(formReiterbalk).hide();$(formReiterbalkAcc).hide();$(formTipMedien).html("").hide();$("#newdetailnavigation").hide();refreshButtons("cmdMerkliste");$("#cmdMerkliste").removeClass("tab_c").addClass("tab_c_active");setTitle("");if(res3!=null)if($("#searchresulttitel3 h3").html()!=null){var a=$("#searchresulttitel3 h3").html().split("|");$("#searchresulttitel3 h3").html(a[0]);setMerklisteActive(); showRestrictions();$("#restrictheader").hide();$(containerRestrictMerkliste).show();GetMainAction(8,3)}else $(formMainAction).hide();changeFontSize(viewmodus,false);changeMainHeightFromResult()} function ChngFrmNetSearch(){if(networkSearch!=""){myFormStatus=6;$("#cmdErgebnisse").removeClass("subtab_a_r").addClass("subtab_a_l");$("#switcher").removeClass("subtab_b_r").addClass("subtab_b_l");$("#cmdVerbundSearch").removeClass("subtab_c_r").addClass("subtab_c_l");$(formContentTop).hide();$(formContentBottom).show();showRestrictions();GetMainAction(6,2);changeMainHeightFromResult()}} function showLoginOpenId(a){if(a==1){$("#login1").hide();$("#loginOpenID").show();$("#txtOpenID").focus()}else{$("#login1").show();$("#loginOpenID").hide()}} function changeFontSize(a,b){var c="1.04em";if(a==1)c="1.24em";else if(a==2)c="1.14em";if($.browser.msie&&$.browser.version.substr(0,1)<=7||a==1)if(myFormStatus==2||myFormStatus==7||myFormStatus==9||myFormStatus==10){if($("th:contains(Themenbereich)").length>0){var d=$("th:contains(Themenbereich)").html().replace("enbe","en-
    be");$("th:contains(Themenbereich)").html(d)}if($("th:contains(Themenabteilung)").length>0){d=$("th:contains(Themenabteilung)").html().replace("enab","en-
    ab");$("th:contains(Themenabteilung)").html(d)}if($("th:contains(Erfassungsdatum)").length> 0){d=$("th:contains(Erfassungsdatum)").html().replace("ngsd","ngs-
    d");$("th:contains(Erfassungsdatum)").html(d)}if($("th:contains(Zugangsdatum)").length>0){d=$("th:contains(Zugangsdatum)").html().replace("ngsd","ngs-
    d");$("th:contains(Zugangsdatum)").html(d)}if($("td:contains(Dezimalklassifikation)").length>0){d=$("td:contains(Dezimalklassifikation)").html().replace("alkl","al-
    kl");$("td:contains(Dezimalklassifikation)").html(d)}}if(a!=0){viewmodus=a;if(b){$("#restrictheader").css("font-size", c);$("#masterwrap").css("font-size",c)}$(".barcontainer h3").css("font-size",c);if(myFormStatus==0)changeMainHeightFromRestriction();else if(myFormStatus==1||myFormStatus==6||myFormStatus==8||myFormStatus==11){$(".medienresultrow h1").css("font-size",c);$(".medienresultrowalternate h1").css("font-size",c);$(".medienresultrow h2").css("font-size",c);$(".medienresultrowalternate h2").css("font-size",c);changeMainHeightFromResult()}else if(myFormStatus==2||myFormStatus==7||myFormStatus==9||myFormStatus== 10){$(".detaillabelcol").css("font-size",c);$(".detailvaluecol").css("font-size",c);changeMainHeightFromDetail()}else if(myFormStatus==4){$("#tableKontoAuszug").css("font-size",c);$("#tableReservationen").css("font-size",c);if(a==1){if($("th:contains(Reservationsdatum)").length>0){d=$("th:contains(Reservationsdatum)").html().replace("nsda","ns-da");$("th:contains(Reservationsdatum)").html(d)}if($("th:contains(Alterskategorie)").length>0){d=$("th:contains(Alterskategorie)").html().replace("rska","rs-ka"); $("th:contains(Alterskategorie)").html(d)}}changeMainHeightFromResult()}if(myFormStatus==0||myFormStatus==3||myFormStatus==4)$(".standardButton").css("font-size",c)}}function GetScrollBox(a){$.getWM("Scrollbox.ashx","id="+a,function(b){setScrollBox(b)},"html")} function setScrollBox(a){if(a.length>0){$(formTipMedien).html(a).show();$("#myScroll").mbScrollable({width:540,elementsInPage:4,elementMargin:2,shadow:false,height:"auto",controls:"#controls",slideTimer:200,autoscroll:false,scrollTimer:100});$(formTipMedien).fadeIn()}else $(formTipMedien).html("").hide();changeMainHeightFromDetail();changeFontSize(viewmodus,false)} function showSlickBox(){if($("#behaelter").is(":hidden")){$("#behaelter").show();$("#More").html("[-]")}else{$("#behaelter").hide();$("#More").html("[+]")}} function correctHeightLanOpac(a){if(isLan=="1"||$.browser.msie&&$.browser.version.substr(0,1)<=7){var b=0;b=$(formMain).height()+lanOpacHeight;if(a==1){$("#rightbar").css("height",b+"px");$("#leftbar").css("height",b+"px");lanOpacHeight>0&&$(formMain).css("height",b+"px");lanOpacHeight=0}else if(a==2||a==3&&myFormStatus!=0){if(myFormStatus==2||myFormStatus==9||myFormStatus==10){b+=25;if($(formTipMedien).is(":visible"))b+=280}else if($(formReiterbalk).is(":visible"))b+=25;$("#rightbar").css("height", b+57+"px");$("#leftbar").css("height",b+57+"px")}else if(a==3&&myFormStatus==0){$("#rightbar").css("height",b+30+"px");$("#leftbar").css("height",b+30+"px")}else{$("#rightbar").css("height","");$("#leftbar").css("height","")}}}function setTitle(a){var b=document.title;if(b.indexOf(":")>-1)b=b.split(":")[0];document.title=b+a}; var res2 = new OpacResult('/VerbundZH/', 2, 8134);var isLan=0; var DesignVersion=0; var key; function initKey() {setMaxDigits(131);key = new RSAKeyPair("010001","","A56EC4743BE3CADDA2AAA045F14D69CB65DA4B00B4E31F9995660C769CD5D3E9D35879E37AA571BB5E76356620230A4E894FFFF7CA55AECCB7D2BF40BDDAB442E9276EA1739C0126524F0D1129E3F60427786137F94A14B8A1DF05D5239DCF57AC049E4DA4CA790E473DE1C4CAAAC7E256BF4C44BEC36C1DC385590DA66809B1");}