function StartTimer(a,b,c,d){a.data(b,setTimeout(d,c))}function StopTimer(a,b){if(a.data(b)!==undefined){clearTimeout(a.data(b));a.removeData(b)}}function AlertRedirect(a,b){jQuery("document").ready(function(){if(b)alert(b);window.location.replace(a)})}function FindPageElement(a){var b;b=$("#"+a);if((b=$("#"+a)).length==0)if((b=$('[name="'+a+'"]')).length==0)b=null;return b}function SetCookie(a,b){document.cookie=a+"="+encodeURIComponent(b)}function GetCookie(a){var b=document.cookie;var c=FindCookie(b,a);var d="";if(c)d=decodeURIComponent(b.substring(c.start,c.end));return d}function FindCookie(a,b){var c=a.indexOf(b);var d=null;if(c!=-1){var e=c+b.length+1;var f=a.indexOf(";",e);if(f==-1)f=a.length;d=new Object({start:e,end:f,length:f-e+1})}return d}function ObfMailLink(a,b,c,d,e){var f;f="<a "+e;f+="h"+'ref="&#x6d;&#97;&#105;&#108;&#116;&#111;&#58;';f+=name+"@"+b;if(c!="")f+="?subject="+c;f+='">';f+=d+"</a>";return f}function ShowHideDiv(a,b){var c=document.getElementById(a);if(c)c.style.visibility=b?"visible":"hidden"}function GetFormElementValue(a){return GetElementValue(GetFormElement(a))}function GetElementValue(a){var b;switch(GetType(a)){case"radio":b=-1;for(i_radio=0;i_radio<a.length;i_radio++){if(a[i_radio].checked){b=a[i_radio].value;break}}break;case"checkbox":if(a.checked)b=a.value;break;default:b=a.value;break}return b}function GetType(a){if(!a)return"";if(a[0]!=null)return a[0].type;return a.type}function GetFormElement(a){return document.forms[sFormName].elements[a]}function GetScreenWidth(){return window.screen.availWidth}function GetScreenHeight(){return window.screen.availHeight}function ScrollDown(a,b){if(a!=0)window.scrollBy(0,b)}function ConsoleLog(a,b){if(typeof console!="undefined")if(typeof b=="undefined"||b<=nConsoleLogLevel)console.log(a)}var nConsoleLogLevel=0
