if (window.location.href.split('#')[1]){ urlpostA = window.location.href.split("#")[1]; window.location = "/fashion/"+urlpostA; } var isfullscreen = false; var isWin = (navigator.userAgent.indexOf('Win') != -1); var isWinXP = (navigator.userAgent.indexOf('Windows NT 5.1') != -1); var isIE = (navigator.userAgent.indexOf('MSIE') != -1); var isNS = (navigator.userAgent.indexOf('Mozilla') != -1) && (navigator.userAgent.indexOf('Firefox') == -1); var isFirefox = (navigator.userAgent.indexOf('Firefox') != -1); var isMAC = (navigator.platform.indexOf('Mac') != -1); var version = parseInt(navigator.appVersion); var previousXPosition = 0; var previousYPosition = 0; var previousWidth = 0; var previousHeight = 0; function openFullscreen(url,newwindow,reload, titlebar) { reload = (typeof reload=="undefined") ? true : reload; if(isIE) { previousXPosition = top.window.screenLeft; previousYPosition = top.window.screenTop; previousWidth = document.body.clientWidth; previousHeight = document.body.clientHeight; } else if(self.outerWidth) { previousXPosition = self.screenX; previousYPosition = self.screenY; previousWidth = self.outerWidth; previousHeight = self.outerHeight; } else { previousXPosition = top.window.screenLeft; previousYPosition = top.window.screenTop; previousWidth = document.body.clientWidth; previousHeight = document.body.clientHeight; } if(isWin && isIE) { top.window.resizeTo(screen.width/2,screen.height/2); top.window.moveTo(0,0); var wleftdiff = top.window.screenLeft; var wrightdiff = (screen.width/2) - top.window.document.body.clientWidth - wleftdiff; var htopdiff = top.window.screenTop; var hbottomdiff = (screen.height/2) - top.window.document.body.clientHeight - htopdiff; var newXPosition = -wleftdiff; var newYPosition = -htopdiff; var newWidth = screen.width+wleftdiff+wrightdiff; var newHeight = screen.height+htopdiff+hbottomdiff; if((newWidth>screen.width) && (newHeight>screen.height)) { previousXPosition -= wleftdiff; previousYPosition -= htopdiff; previousWidth += wleftdiff+wrightdiff; previousHeight += htopdiff+hbottomdiff; } top.window.resizeTo(previousWidth,previousHeight); top.window.moveTo(previousXPosition,previousYPosition); parameters = "x="+previousXPosition+"&y="+previousYPosition+"&width="+previousWidth+"&height="+previousHeight; if(isWinXP || newwindow) { url = (url.indexOf('?') != -1) ? url+"&"+parameters : url+"?"+parameters; if(!titlebar) { arg = 'fullscreen=yes' } else { deltaWidth = -8; deltaHeight = -30; newWidth = screen.width + deltaWidth; newHeight = screen.height + deltaHeight; arg = 'width='+newWidth+',height='+newHeight+',left=0,top=0,status=0,toolbar=0,location=0,menubar=0,directories=0,resizable=0,scrollbars=0' } window.open(url,'chanelfullscreen', arg); if(!newwindow) { top.window.opener = top; top.window.close(); } } else { top.window.moveTo(newXPosition-2,newYPosition-2); top.window.resizeTo(newWidth,newHeight); if(reload) { top.location.href = (url.indexOf('?') != -1) ? url+"&"+parameters : url+"?"+parameters; } } } else { deltaWidth = (isNS) ? ((isMAC) ? -10 : -5) : ((isMAC) ? -5 : 0); deltaHeight = (isNS) ? ((isMAC) ? -50 : -50) : ((isMAC) ? -2 : -30); deltaLeft = (isNS) ? ((isMAC) ? -6 : -6) : ((isMAC) ? -5 : -5); deltaTop = (isNS) ? ((isMAC) ? -30 : -30) : ((isMAC) ? -10 : -30); newWidth = screen.width + deltaWidth; newHeight = screen.height + deltaHeight; parameters = "x="+previousXPosition+"&y="+previousYPosition+"&width="+previousWidth+"&height="+previousHeight; url = (url.indexOf('?') != -1) ? url+"&"+parameters : url+"?"+parameters; newwin = window.open(url,'chanelfullscreen', 'width='+newWidth+',height='+newHeight+',left=0,top=0,status=0,toolbar=0,location=0,menubar=0,directories=0,resizable=0,scrollbars=0'); newwin.resizeTo(newWidth,newHeight); newwin.moveTo(0,0); if(!newwindow) { top.window.opener = top; top.window.close(); } } } function openwin(name,myname,mywidth,myheight,mytool,mydir,mystatus,myscroll,myresize,mymenu) { mytop=Math.floor((screen.height/2) - (myheight/2)); myleft=Math.floor((screen.width/2) - (mywidth/2)); debute =window.open(name,myname,"toolbar="+mytool+",width="+mywidth+",height="+myheight+",directories="+mydir+",status="+mystatus+",scrollbars="+myscroll+",top="+mytop+",left="+myleft+",resizable="+myresize+",menubar="+mymenu) } function ShowPopupLegal(strLegalURL){ openwin(strLegalURL,'legal',600,700,0,0,0,1,0,0); } function Showpopup() { openwin('http://www.chanel.com/register/en-us/register.php','USRegistration',800,380,0,0,0,1,0,0); } function ShowpopupPt() { openwin('http://www.chanel.com/register/pt-br/register.php','USRegistration',800,380,0,0,0,1,0,0); }