var browser = navigator.userAgent; var ie = (browser.search(/msie/i) > 0)? 1 : 0; var opera = (browser.search(/opera/i) > 0)? 1 : 0; var mozilla = (browser.search(/mozilla/i) > 0)? 1 : 0; var mx, my; // register event-functions //document.onmousemove = mouseCoords; //document.onload = init; //window.onerror = errorEvent(); //window.onload = correctPNG; function correctPNG() { if ( ie ) { window.png = new PNGTransparency(); window.png.create(); } } function PNGTransparency() { this.create = PNGTransparency_create; } function PNGTransparency_create() { var i, img, oldsrc; var imgs = document.getElementsByTagName( 'IMG' ); for(i = 0;i < imgs.length;i++) { img = imgs[i]; if (img.getAttribute('src', false).match(/\.png$/i) && navigator.userAgent.match(/MSIE\s+(5.5|6.0)/i)) { newSpan = document.createElement("span"); img.parentNode.insertBefore(newSpan, img); newSpan.style.width = img.offsetWidth + 'px'; newSpan.style.height = img.offsetHeight + 'px'; newSpan.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + img.getAttribute('src', false) + "', sizingMethod='crop', enabled=true)"; img.style.display = 'none'; } } } function init() { if (typeof startup == "function") startup(); } function errorEvent() { return true; } function mouseCoords(e) { mx = (ie) ? event.clientX + document.body.scrollLeft : e.pageX; my = (ie) ? event.clientY + document.body.scrollTop : e.pageY; } function selectIndex(form, name, value) { eval("var o=document."+form+"."+name+";"); for (var i=0; i < o.length; i++) { if (o.options[i].value == value) o.options[i].selected = true; } } function getObject(id) { if (document.all) { return(document.all[id]); } else if (document.getElementById) { return(document.getElementById(id)); } } function getNamedObject(name) { return(document.getElementsByName(name)[0]); } function getPageCoords (elementId) { var element = getObject(elementId); if (element) { var coords = {x: 0, y: 0}; do { coords.x += element.offsetLeft; coords.y += element.offsetTop; element = element.offsetParent; } while (element) return coords; } else { return null; } } function call(link) { location.href=link; } function checkcall(text, link) { s = confirm(text); if (s==1) location.href=link; } function xsubmit(url) { document.postform.action = url; document.postform.submit(); } function setPost(name, val) { eval("document.postform."+name+".value = val"); } function imail(obj, text) { p = text.split("?"); e = p[1]+"@"+p[0]; obj.href = "mailto:"+e; obj.innerHTML = e; } function resizeObject(name, style, offset) { switch (style) { case "height" : h = (ie) ? document.body.offsetHeight : window.innerHeight; getObject.style.height = h - offset; break; case "width" : w = (ie) ? document.body.offsetWidth : window.innerWidth; getObject.style.width = w - offset; break; } } function setFormParameters(id, method, target, action) { getNamedObject(id).method = method; getNamedObject(id).target = target; getNamedObject(id).action = action; getNamedObject(id).submit(); } function reload_secpic(id) { getObject(id).src = getObject(id).src + Math.random(); } function checkInputMax(o, len) { return true; if (o.value.length < len) return true; o.value = o.value.substr(0, o.value.length-1); alert("Maximum Length reached!"); return true; }