var InternetExplorer = navigator.appName.indexOf("Microsoft") != -1;

function openCenter(url, name, w, h, feat)
{
if (document.all)
{
ScreenX = document.body.scrollWidth;
ScreenY = top.document.body.clientHeight;
}
else
{
var ScreenX = top.innerWidth - 16;
var ScreenY = top.innerHeight - 16;
}

window.open(url, name, "width=" + w + ",height=" + h + ",left=10,top=10," + feat);
}




function openCokeBan() {
        openWin('banners/ban_pop_coke.html','coke',600,200,'menubar=no,toolbar=no,status=no,scrollbars=no,resizable=no,')
}

function openWin(html,name,w,h,features) {
        x = (screen.availWidth - w) / 2
        y = (screen.availHeight - h - 100) / 2 
        win = window.open(html,name,'width='+w+',height='+h+','+features)
        if(InternetExplorer) {win.moveTo(x,y)}
                win.focus()
        }
        
        

if (top.location != self.location) {
	top.location.replace(self.location)
	}

