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.src.indexOf( '.png' ) != -1 ) { alert("change"); oldsrc = img.src; img.src = DEF_Spacer; img.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + oldsrc + "', sizingMethod='scale')"; } } } 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 reload_secpic(id) { getObject(id).src = getObject(id).src + Math.random(); }