if (this.name = '') this.name='shEAMainWnd'; this.focus(); var FlyOutStatus = parseInt(ReadCookie('flyoutDisabled'), 10); function imagePopUp(urlToOpen) { var x = (screen.width-800)/2, y = (screen.height-800)/2; OpenWin = this.open(urlToOpen, "CtrlWindow", "toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes, screenX="+x+", screenY="+y+", left="+x+", top="+y); } 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-450)/2, y = (screen.height-340)/2; OpenWin = this.open(urlRecommandForThisArticle, "CtrlWindow", "width=450,height=340,toolbar=no,menubar=no,location=no,scrollbars=no,resizable=no, screenX="+x+", screenY="+y+", left="+x+", top="+y); } var currentFlyoutID = 0; function displayFlyOut(flyoutID, positionIt){ if(!FlyOutStatus){ var el = document.getElementById('flyoutFor_'+flyoutID+''); if(positionIt && el){ // left -> get contents if (el.getAttribute("align") == 'left' && currentFlyoutID != flyoutID) { currentFlyoutID = flyoutID; makePOSTRequest(document.getElementsByTagName('base')[0].getAttribute('href')+'index.html/mainpage|getFlyOutContent', 'categoryID='+flyoutID, 'setFlyOutContent'); } var auxPosition = getElementPosition(document.getElementById('flyOutOpener_'+flyoutID+'')); auxPosition.left = auxPosition.left + 150; auxPosition.top = auxPosition.top - 24; el.style.left = auxPosition.left+"px"; el.style.top = auxPosition.top+"px"; } el.style.display = 'inline'; document.getElementById('flyOutOpener_'+flyoutID+'').style.backgroundColor = '#FEF200'; var aSelectElements = document.getElementsByTagName("select"); for (i=0; i < aSelectElements.length; i++) { aSelectElements[i].style.visibility = 'hidden'; } } } function setFlyOutContent() { if (http_request_di.readyState == 4) { if (http_request_di.status == 200) { var el = document.getElementById('flyoutFor_'+currentFlyoutID+''); el.innerHTML = http_request_di.responseText; el.setAttribute("align", ''); currentFlyoutID = 0; } else { // bad things happened... } } } function closeFlyOut(flyoutID){ if(!FlyOutStatus){ var el = document.getElementById('flyoutFor_'+flyoutID+''); el.style.display = 'none'; document.getElementById('flyOutOpener_'+flyoutID+'').style.backgroundColor = '#eeeeee'; var aSelectElements = document.getElementsByTagName("select"); for (i=0; i < aSelectElements.length; i++) { aSelectElements[i].style.visibility = 'visible'; } } } function displaySubMenus(elemID, elSource){ var el = document.getElementById(elemID); if(elSource){ var auxPosition = getElementPosition(elSource); auxPosition.left = auxPosition.left-10; auxPosition.top = auxPosition.top + 13; el.style.left = auxPosition.left+"px"; el.style.top = auxPosition.top+"px"; } el.style.display = 'inline'; } function closeSubMenus(elemID){ var el = document.getElementById(elemID); el.style.display = 'none'; } function getElementPosition(elem) { var offsetTrail = elem; var offsetLeft = 0; var offsetTop = 0; while (offsetTrail) { offsetLeft += offsetTrail.offsetLeft; offsetTop += offsetTrail.offsetTop; offsetTrail = offsetTrail.offsetParent; } if (navigator.userAgent.indexOf("Mac") != -1 && typeof document.body.leftMargin != "undefined") { offsetLeft += document.body.leftMargin; offsetTop += document.body.topMargin; } return {left:offsetLeft, top:offsetTop}; } function SetJSCookie(cookieName,cookieValue,nDays) { var today = new Date(); var expire = new Date(); if (nDays==null || nDays==0) nDays=1; expire.setTime(today.getTime() + 3600000*24*nDays); document.cookie = cookieName+"="+escape(cookieValue) + ";expires="+expire.toGMTString(); } function ReadCookie(cookieName) { var theCookie=""+document.cookie; var ind=theCookie.indexOf(cookieName); if (ind==-1 || cookieName=="") return ""; var ind1=theCookie.indexOf(';',ind); if (ind1==-1) ind1=theCookie.length; return unescape(theCookie.substring(ind+cookieName.length+1,ind1)); } function FlyOut(type){ if(type == 'disable'){ SetJSCookie('flyoutDisabled', 1, 365); FlyOutStatus = 1; document.getElementById('disableFlyout').style.display = 'none'; document.getElementById('enableFlyOut').style.display = 'block'; } if(type == 'enable'){ SetJSCookie('flyoutDisabled', 0, -1); FlyOutStatus = 0; document.getElementById('disableFlyout').style.display = 'block'; document.getElementById('enableFlyOut').style.display = 'none'; } } function OpenMovieView(URLaddress){ var width = 970; var height=600; var x=window.open(URLaddress, "shEAPopUpWnd","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=yes, width="+width+", height="+height+", top="+(screen.height-height)/2+", left="+(screen.width-width)/2); } var http_request_di = false; function makePOSTRequest(url, parameters, onreadystatechangeFunctionName) { http_request_di = false; if (window.XMLHttpRequest) { // Mozilla, Safari,... http_request_di = new XMLHttpRequest(); if (http_request_di.overrideMimeType) { http_request_di.overrideMimeType('text/xml'); } } else if (window.ActiveXObject) { // IE try { http_request_di = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { http_request_di = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) {} } } if (!http_request_di) { alert('Cannot create XMLHTTP instance'); return false; } http_request_di.onreadystatechange = eval(onreadystatechangeFunctionName); http_request_di.open('POST', url, true); http_request_di.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); http_request_di.setRequestHeader("Content-length", parameters.length); http_request_di.setRequestHeader("Connection", "close"); http_request_di.send(parameters); } function loadArticle(articleID){ var baseHref = document.getElementsByTagName("base")[0].href; window.opener.location = baseHref+'uniunea-europeana/articles|displayArticle?articleID='+articleID; window.opener.focus(); window.close(); } function setupSkyscrappers(){ var fullPageWidth = pageWidth(); var leftPos = (fullPageWidth - 950 - 10) / 2; document.getElementById('reclamaStangaSky').style.left = (leftPos - 185) + 'px'; document.getElementById('reclamaDreaptaSky').style.left = (leftPos + 950) + 'px'; document.getElementById('reclamaStangaSky').style.display = 'block'; document.getElementById('reclamaDreaptaSky').style.display = 'block'; if(document.getElementById('reclamaTop')){ elPos = getElementPosition(document.getElementById('header')); document.getElementById('reclamaTop').style.left = (leftPos + 140) + 'px'; document.getElementById('reclamaTop').style.top = (elPos.top + 30) + 'px'; } } function pageWidth() {return window.innerWidth != null? window.innerWidth : document.documentElement && document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body != null ? document.body.clientWidth : null;}