var state = 'hidden'; function showhide(layer_ref) { if (state == 'visible') { state = 'hidden'; } else { state = 'visible'; } if (document.all) { //IS IE 4 or 5 (or 6 beta) eval( "document.all." + layer_ref + ".style.visibility = state"); } if (document.layers) { //IS NETSCAPE 4 or below document.layers[layer_ref].visibility = state; } if (document.getElementById && !document.all) { maxwell_smart = document.getElementById(layer_ref); maxwell_smart.style.visibility = state; } } /*functii trimite display/ not display*/ function detshow(idnum) { if(document.getElementById){ if(document.getElementById(idnum)){ var elem = document.getElementById(idnum); //var hdr = document.getElementById(idnum) if(elem == null) { return; } if(elem.style.display == "none") { elem.style.display = ""; if(document.getElementById(idnum)){document.getElementById(idnum).style.display = "none";} if(document.getElementById(idnum)){document.getElementById(idnum).style.display = "";} } else { elem.style.display = "none"; if(document.getElementById(idnum)){document.getElementById(idnum).style.display = "";} if(document.getElementById(idnum)){document.getElementById(idnum).style.display = "none";} } } window.event.cancelBubble = true; return false; } } function plusshow(idnum) { if(document.getElementById){ if(document.getElementById(idnum)){ var elem = document.getElementById(idnum); if(elem == null) { return; } if(elem.style.display == "none") { elem.style.display = ""; if(document.getElementById(idnum)){document.getElementById(idnum).style.display = "none";} if(document.getElementById(idnum)){document.getElementById(idnum).style.display = "";} } else { elem.style.display = "none"; if(document.getElementById(idnum)){document.getElementById(idnum).style.display = "";} if(document.getElementById(idnum)){document.getElementById(idnum).style.display = "none";} } } window.event.cancelBubble = true; return false; } } /*end functii trimite */ function openEmail(file,window) { msgWindow=open('','window','resizable=no,width=400,height=175'); msgWindow.location.href = file; if (msgWindow.opener == null) { msgWindow.opener = self; } } /*function printerFriendly(urlToOpen) { var x = (screen.width-600)/2, y = (screen.height-400)/2; OpenWin = this.open(urlToOpen, "CtrlWindow", "width=520,height=500 toolbar=no,menubar=yes,location=no,scrollbars=yes,resizable=no, screenX="+x+", screenY="+y+", left="+x+", top="+y); window.print(urlToOpen); }*/ function printerFriendly(urlToOpen) { var x = (screen.width-600)/2, y = (screen.height-400)/2; OpenWin = this.open(urlToOpen, "CtrlWindow", "width=800,height=600 toolbar=no,menubar=yes,location=no,scrollbars=yes,resizable=no, screenX="+x+", screenY="+y+", left="+x+", top="+y); } function recommend(urlRecommandForThisArticle) { var x = (screen.width-400)/2, y = (screen.height-400)/2; OpenWin = this.open(urlRecommandForThisArticle, "CtrlWindow", "width=400,height=270 toolbar=no,menubar=no,location=no,scrollbars=no,resizable=no, screenX="+x+", screenY="+y+", left="+x+", top="+y); } var supersleight = function() { var root = false; var applyPositioning = true; // Path to a transparent GIF image var shim = 'images/x.gif'; // RegExp to match above GIF image name var shim_pattern = /x\.gif$/i; var fnLoadPngs = function() { if (root) { root = document.getElementById(root); }else{ root = document; } for (var i = root.all.length - 1, obj = null; (obj = root.all[i]); i--) { // background pngs if (obj.currentStyle.backgroundImage.match(/\.png/i) !== null) { bg_fnFixPng(obj); } // image elements if (obj.tagName=='IMG' && obj.src.match(/\.png$/i) !== null){ el_fnFixPng(obj); } // apply position to 'active' elements if (applyPositioning && (obj.tagName=='A' || obj.tagName=='INPUT') && obj.style.position === ''){ obj.style.position = 'relative'; } } }; var bg_fnFixPng = function(obj) { var mode = 'scale'; var bg = obj.currentStyle.backgroundImage; var src = bg.substring(5,bg.length-2); if (obj.currentStyle.backgroundRepeat == 'no-repeat') { mode = 'crop'; } obj.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "', sizingMethod='" + mode + "')"; obj.style.backgroundImage = 'url('+shim+')'; }; var el_fnFixPng = function(img) { var src = img.src; img.style.width = img.width + "px"; img.style.height = img.height + "px"; img.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "', sizingMethod='scale')"; img.src = shim; }; var addLoadEvent = function(func) { var oldonload = window.onload; if (typeof window.onload != 'function') { window.onload = func; } else { window.onload = function() { if (oldonload) { oldonload(); } func(); }; } }; return { init: function() { addLoadEvent(fnLoadPngs); }, limitTo: function(el) { root = el; }, run: function() { fnLoadPngs(); } }; }(); // limit to part of the page ... pass an ID to limitTo: //supersleight.limitTo('layer_mic'); supersleight.init();