var SWFObjectScript = "http://deluxe-catalog.ro/23/8361/swfobject.js"; //var SWFmacmousewheelScript = "http://deluxe-catalog.ro/23/8361/swfmacmousewheel.js"; var SWFaddressScript = "http://deluxe-catalog.ro/23/8361/swfaddress.js"; function _ImportScript(jsurl, bUseCache, CallBackFunc, SafariTest ) { //Supply CallBack to verify load before accessing loaded objects. //Use SafariTest to trigger the callback func for safari, e.g. test for vars defined in the loaded script var head = document.getElementsByTagName("head").item(0); var s = document.createElement("SCRIPT"); //s.src = ((bUseCache)?jsurl:GetUniqueURL(jsurl)); s.src = jsurl; s.type = "text/javascript"; /* if(typeof CallBackFunc == "function"){ if(typeof s.onreadystatechange != "undefined"){//ie s.onreadystatechange = function(){if(/loaded|complete/.test(s.readyState)){s.onreadystatechange = null; CallBackFunc();} }; }else if(/safari/i.test(navigator.userAgent) && SafariTest ){ //Safari does not support event callbacks window.SafariLoaded = function(){if(eval(SafariTest)){ CallBackFunc(); }else{ window.setTimeout("window.SafariLoaded()",100)}; } window.SafariLoaded(); }else{ CallBackFunc.once = true;//avoid repeated callbacks s.onload = function(){ if(CallBackFunc.once){CallBackFunc.once = false; CallBackFunc();} } ; //mac:camino,moz,fx. win:moz,fx,opera 9x s.load = function(){ if(CallBackFunc.once){CallBackFunc.once = false; CallBackFunc();} }; //opera 8x } } */ head.appendChild(s); //window.onload = function() {if (CallBackFunc) CallBackFunc();} //if (CallBackFunc) CallBackFunc(); } //_ImportScript(SWFmacmousewheelScript,true,null,true); _ImportScript(SWFaddressScript,true,null,true); _ImportScript(SWFObjectScript,true,start_swf,true); /* if (typeof window.onload != "function") { window.onload = start_swf; } else { var old = window.onload; window.onload = function() { old(); start_swf(); } } */ function PF_return_page_number(){var page_name=window.location.href.substring(window.location.href.lastIndexOf("/")+1);var regex=new RegExp("([a-z,0-9,-]+)-([0-9]+).html");var qs=regex.exec(page_name);if(qs==null)return"";else if(parseInt(qs[2]))return qs[2];else return"";} function SWFMacMouseWheel(swfObject){this.so=swfObject;var isMac=navigator.appVersion.toLowerCase().indexOf("mac")!=-1;if(isMac)this.init();}SWFMacMouseWheel.prototype={init:function(){SWFMacMouseWheel.instance=this;if(window.addEventListener){window.addEventListener("DOMMouseScroll",SWFMacMouseWheel.instance.wheel,false);}window.onmousewheel=document.onmousewheel=SWFMacMouseWheel.instance.wheel;},handle:function(delta){document[this.so].externalMouseEvent(delta);},wheel: function(event){var delta=0;if(event.wheelDelta){/* IE/Opera. */delta=event.wheelDelta/120;if(window.opera)delta=-delta;}else if (event.detail){/** Mozilla case. */delta=-event.detail/3;}if(/AppleWebKit/.test(navigator.userAgent)){delta/=3;}if(delta)SWFMacMouseWheel.instance.handle(delta);if(event.preventDefault)event.preventDefault();event.returnValue=false;}}; function AddMacMouseWheel(obj){ var macmousewheel = new SWFMacMouseWheel( obj["id"] ); } function urlencode(str) { str = escape(str); str = str.replace("+", "%2B"); str = str.replace("%20", "+"); str = str.replace("*", "%2A"); str = str.replace("/", "%2F"); str = str.replace("@", "%40"); return str; } function urldecode(str) { str = str.replace("+", " "); str = unescape(str); return str; } /** * * Base64 encode / decode * http://www.webtoolkit.info/ * **/ var Base64 = { // private property _keyStr : "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", // public method for encoding encode : function (input) { var output = ""; var chr1, chr2, chr3, enc1, enc2, enc3, enc4; var i = 0; input = Base64._utf8_encode(input); while (i < input.length) { chr1 = input.charCodeAt(i++); chr2 = input.charCodeAt(i++); chr3 = input.charCodeAt(i++); enc1 = chr1 >> 2; enc2 = ((chr1 & 3) << 4) | (chr2 >> 4); enc3 = ((chr2 & 15) << 2) | (chr3 >> 6); enc4 = chr3 & 63; if (isNaN(chr2)) { enc3 = enc4 = 64; } else if (isNaN(chr3)) { enc4 = 64; } output = output + this._keyStr.charAt(enc1) + this._keyStr.charAt(enc2) + this._keyStr.charAt(enc3) + this._keyStr.charAt(enc4); } return output; }, // public method for decoding decode : function (input) { var output = ""; var chr1, chr2, chr3; var enc1, enc2, enc3, enc4; var i = 0; input = input.replace(/[^A-Za-z0-9\+\/\=]/g, ""); while (i < input.length) { enc1 = this._keyStr.indexOf(input.charAt(i++)); enc2 = this._keyStr.indexOf(input.charAt(i++)); enc3 = this._keyStr.indexOf(input.charAt(i++)); enc4 = this._keyStr.indexOf(input.charAt(i++)); chr1 = (enc1 << 2) | (enc2 >> 4); chr2 = ((enc2 & 15) << 4) | (enc3 >> 2); chr3 = ((enc3 & 3) << 6) | enc4; output = output + String.fromCharCode(chr1); if (enc3 != 64) { output = output + String.fromCharCode(chr2); } if (enc4 != 64) { output = output + String.fromCharCode(chr3); } } output = Base64._utf8_decode(output); return output; }, // private method for UTF-8 encoding _utf8_encode : function (string) { string = string.replace(/\r\n/g,"\n"); var utftext = ""; for (var n = 0; n < string.length; n++) { var c = string.charCodeAt(n); if (c < 128) { utftext += String.fromCharCode(c); } else if((c > 127) && (c < 2048)) { utftext += String.fromCharCode((c >> 6) | 192); utftext += String.fromCharCode((c & 63) | 128); } else { utftext += String.fromCharCode((c >> 12) | 224); utftext += String.fromCharCode(((c >> 6) & 63) | 128); utftext += String.fromCharCode((c & 63) | 128); } } return utftext; }, // private method for UTF-8 decoding _utf8_decode : function (utftext) { var string = ""; var i = 0; var c = c1 = c2 = 0; while ( i < utftext.length ) { c = utftext.charCodeAt(i); if (c < 128) { string += String.fromCharCode(c); i++; } else if((c > 191) && (c < 224)) { c2 = utftext.charCodeAt(i+1); string += String.fromCharCode(((c & 31) << 6) | (c2 & 63)); i += 2; } else { c2 = utftext.charCodeAt(i+1); c3 = utftext.charCodeAt(i+2); string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63)); i += 3; } } return string; } } function start_swf() { try { //alert("start_swf function"); var publication_width = ""; publication_width = publication_width ? publication_width : "100%"; var publication_height = ""; publication_height = publication_height ? publication_height : "100%"; var flashvars = {}; if (swfobject.getQueryParamValue("sess_key")) { flashvars.sess_key = swfobject.getQueryParamValue("sess_key"); } flashvars.__pagenumber__ = PF_return_page_number(); flashvars.__referrer__ = urlencode(Base64.encode(document.referrer)); flashvars.__host__ = escape(document.location.host); var params = { allowFullScreen: true, allowScriptAccess: "always" }; var attributes = { id: "application", name: "application" } swfobject.embedSWF("http://deluxe-catalog.ro/23/8361/publication.swf", "application", publication_width, publication_height, "9.0.0","http://deluxe-catalog.ro/expressInstall.swf", flashvars, params, attributes,AddMacMouseWheel); } catch (e) { //alert(e); } }