function printerFriendly(urlToOpen) { var x = (screen.width-600)/2, y = (screen.height-400)/2; OpenWin = this.open(urlToOpen, "CtrlWindow", "width=600,height=400,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-380)/2, y = (screen.height-340)/2; OpenWin = this.open(urlRecommandForThisArticle, "CtrlWindow", "width=450,height=400,toolbar=no,menubar=no,location=no,scrollbars=no,resizable=0,status=0, screenX="+x+", screenY="+y+", left="+x+", top="+y); } jx = { http:false, //HTTP Object format:'text', callback:function(data){}, error:false, //Create a xmlHttpRequest object - this is the constructor. getHTTPObject : function() { var http = false; //Use IE's ActiveX items to load the file. if(typeof ActiveXObject != 'undefined') { try {http = new ActiveXObject("Msxml2.XMLHTTP");} catch (e) { try {http = new ActiveXObject("Microsoft.XMLHTTP");} catch (E) {http = false;} } //If ActiveX is not available, use the XMLHttpRequest of Firefox/Mozilla etc. to load the document. } else if (XMLHttpRequest) { try {http = new XMLHttpRequest();} catch (e) {http = false;} } return http; }, // This function is called from the user's script. //Arguments - // url - The url of the serverside script that is to be called. Append all the arguments to // this url - eg. 'get_data.php?id=5&car=benz' // callback - Function that must be called once the data is ready. // format - The return type for this function. Could be 'xml','json' or 'text'. If it is json, // the string will be 'eval'ed before returning it. Default:'text' load : function (url,callback,format) { this.init(); //The XMLHttpRequest object is recreated at every call - to defeat Cache problem in IE if(!this.http||!url) return; if (this.http.overrideMimeType) this.http.overrideMimeType('text/xml'); this.callback=callback; if(!format) var format = "text";//Default return type is 'text' this.format = format.toLowerCase(); var ths = this;//Closure if (this.http.overrideMimeType) this.http.overrideMimeType('text/xml'); //Kill the Cache problem in IE. var now = "uid=" + new Date().getTime(); url += (url.indexOf("?")+1) ? "&" : "?"; url += now; this.http.open("GET", url, true); this.http.onreadystatechange = function () {//Call a function when the state changes. if(!ths) return; var http = ths.http; if (http.readyState == 4) {//Ready State will be 4 when the document is loaded. if(http.status == 200) { var result = ""; if(http.responseText) result = http.responseText; //If the return is in JSON format, eval the result before returning it. if(ths.format.charAt(0) == "j") { //\n's in JSON string, when evaluated will create errors in IE result = result.replace(/[\n\r]/g,""); result = eval('('+result+')'); } //Give the data to the callback function. if(ths.callback) ths.callback(result); } else { //An error occured if(ths.error) ths.error() } } } this.http.send(null); }, init : function() {this.http = this.getHTTPObject();} } function gE(el) { return document.getElementById(el); } function newsletterRegister() { var urlToOpen = document.getElementsByTagName('base')[0].href; urlToOpen += 'index.html/mainpage|newsletterRegister?doRegister=1&nlEmail='+gE('nlEmail').value; jx.load(urlToOpen, newsletterRegisterCheck, 'text'); } function newsletterRegisterCheck(result) { if(result.length) { gE('nlSysMessage').innerHTML = result; gE('nlSysMessage').style.display = 'block'; } } function show_flash(id) { document.getElementById(id).outerHTML = document.getElementById(id).outerHTML; } function _onLoad() { if(window.populate) populate(); if(window.startPlay) startPlay(); } window.onload = _onLoad; function getCumulativeOffset(el) { var valueT = 0, valueL = 0; do { valueT += el.offsetTop || 0; valueL += el.offsetLeft || 0; el = el.offsetParent; } while (el); return [valueL, valueT]; } function onClipDone(clip) { var t = getCumulativeOffset(document.getElementById('flowplayerholder'))[1]; var l = getCumulativeOffset(document.getElementById('flowplayerholder'))[0]; document.getElementById('containerReplay').style.top = (t*1 + 10*1) + 'px'; document.getElementById('containerReplay').style.left = (l*1 + 10*1) + 'px'; document.getElementById('containerReplay').style.display = 'block'; document.getElementById('FlowPlayer').style.visibility= 'hidden'; } function doReplay() { if(!document.all) { document.getElementById('FlowPlayer').style.visibility= 'visible'; document.getElementById('containerReplay').style.display = 'none'; document.getElementById('FlowPlayer').DoPlay(); } else { location.reload(); } }