function get_timestamp_by_id(D,A,F){if(F==null){F=true}if(!D){var E=new Array("01","01","1970")}else{if(F){var E=document.getElementById(D).value.split(".")}else{var E=D.split(".")}}if(!A){var C=new Array("00","00")}else{if(F){var C=document.getElementById(A).value.split(":")}else{var C=A.split(":")}}var B=new Date(E[2],(E[1]-1),E[0],C[0],C[1],0).getTime()/1000;return B}function generateEventTime(C,A){var B=C[2]+", "+C[0];if(C[0]==A[0]){if(C[1]!=A[1]){B+=" "+C[1]+" - "+A[1]+"&nbsp;Uhr"}else{B+=" "+C[1]+"&nbsp;Uhr"}}else{B+=" "+C[1]+" - "+A[2]+", "+A[0]+" "+A[1]}return B}function changeUser(){el=document.getElementById("overrideuser");var B={changeUser:function(C){if(typeof C.type!="undefined"){alert(C.type+": "+C.msg)}else{window.location.href="/index.php/site/vamng/adminlist/"}}};var A=new user(B);A.changeUser(el.value);return false}function changeimg(C,B,A){C=document.getElementById(C);if(A){C.src="/design/portal/images/social"+B+"_o.gif"}else{C.src="/design/portal/images/social"+B+".gif"}}var clicks=0;function dogame(){if(clicks==5){document.getElementById("debug_master").innerHTML='<div style="height:20px;">&nbsp;</div><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="600" height="283"><param name="movie" value="/design/nordwesten/images/affe.swf"><param name="quality" value="high"><embed src="/design/nordwesten/images/affe.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="600" height="283"></embed></object>';var A=new YAHOO.widget.Dialog("debug_master");A.cfg.queueProperty("visible",false);A.cfg.queueProperty("fixedcenter",true);A.cfg.queueProperty("modal",true);A.render();A.show()}else{if(clicks>5){clicks=0}clicks=clicks+(1*1)}}function setCheckboxes(B){var C=document.getElementsByName(B);var A=true;if(C[0].checked==true){A=false}for(i=0;i<C.length;i++){C[i].checked=A}}function confirm_msg(A){check=confirm(A);if(check){return true}else{return false}}function check_and_goto(checkfields,ifok){var theElement="";var all_ok=true;for(var i=0;i<checkfields.length;i++){theElement=document.getElementById(checkfields[i]);if(theElement.value==""||!theElement.value){all_ok=false;theElement.style.border="2px solid red"}}if(all_ok==true){eval(ifok)}else{if(typeof normal_alert_flag!="undefined"){alert("Bitte fuellen Sie alle Pflichtfelder aus.")}else{show_infocontainer("Bitte f&uuml;llen Sie alle Pflichtfelder aus.")}}}function reset_border(A){var B=document.getElementById(A);if(B.value.length>0){B.style.border="1px solid #666"}}function show_infocontainer(A,B){A='<div style="margin-left:2.5em;line-height:1.4em;padding-right:1.5em;">'+A+"</div>";if(B!=false){A+='<div class="greenbutton" style="margin-bottom:1em;margin-top:1.5em;position:absolute;left:50%;margin-left:-24px;"><a href="#" onclick="infocontainer.hide();return false;"><div class="greenbutton_left"></div><div class="greenbutton_title">Ok</div><div class="greenbutton_right"></div></a><div class="clear"></div></div><div class="clear" style="margin-top:3em;"></div>'}infocontainer=new YAHOO.widget.SimpleDialog("infocontainer",{fixedcenter:true,visible:false,draggable:false,close:false,modal:true,text:A,icon:YAHOO.widget.SimpleDialog.ICON_WARN});infocontainer.render(document.body);infocontainer.show()}function show_waitcontainer(A,B){if(!A){A="Bitte warten..."}if(!B){B='<img src="/design/nordwesten/images/loading.gif" alt="loading..." />'}loadingscreen=new YAHOO.widget.Panel("wait",{fixedcenter:true,close:false,draggable:false,zindex:4,modal:true,visible:false});loadingscreen.setHeader(A);loadingscreen.setBody(B);loadingscreen.render(document.body);loadingscreen.show()}function hide_waitcontainer(){loadingscreen.hide()}function show_calendar_alternative(A){document.getElementById(A).style.display="block"}function check_timefield(B,A){var C=false;var E=document.getElementById(B).value;if(E.length!=0){if(!E.match(/[0-2][0-9]\:[0-5][0-9]/)&&!E.match(/[0-9]\:[0-5][0-9]/)){C=true}if(C==false){var D=E.split(":");if(D.length==2){if((D[0].length!=1&&D[0].length!=2)||D[0]<0||D[0]>23){C=true}if(D[1].length!=2||D[1]<0||D[1]>59){C=true}}else{C=true}}}if(C==true){document.getElementById(B).style.border="2px solid red";alert("Die eingegebene Uhrzeit scheint nicht korrekt zu sein.")}return C}function getMonthNum(A){var B=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");var C=0;for(i=0;i<B.length;i++){if(A==B[i]){C=i+1}}if(C<10){C="0"+C}return C}function stamp_to_date(C,B){var J=new Date(C*1000);var H=""+J.getHours();var G=""+J.getMinutes();var A=""+J.getDate();var E=""+J.getMonth();var I=""+J.getFullYear();E=(E*1)+1;if(E==13){E=1}E=""+E;if(A.length<2){A="0"+A}if(E.length<2){E="0"+E}if(!B){I=I.substr(2,3)}if(H.length<2){H="0"+H}if(G.length<2){G="0"+G}var L=A+"."+E+"."+I;var F=H+":"+G;var D=new Array("So","Mo","Di","Mi","Do","Fr","Sa");var K=D[J.getDay()];rueck=new Array(L,F,K);return rueck}function Option_to_Select(D,A,E){var B=document.createElement("option");var C=document.createTextNode(A);B.appendChild(C);var F=document.createAttribute("value");F.nodeValue=E;B.setAttributeNode(F);document.getElementById(D).appendChild(B)}function clear_selectbox(B){var A=document.getElementById(B).lastChild;while(A){geloescht=document.getElementById(B).removeChild(A);A=document.getElementById(B).lastChild}}function is_checked(A){if(document.getElementById(A)){if(document.getElementById(A).checked==true){return true}}return false};