mw=null;

function popupNews(){
	popup('news/news.html','news','500','675','0');
}

function popupEvent(){
	popup('news/event.html','event','655','675','0');
}

function href2Event(){
	resize('event.html','685','715');
}

function resize(url,w,h){
	window.resizeTo(w,h);
	window.location.href = url;
}


function popup(url,wname,w,h,scroll){
	if(mw != null && !mw.closed){
		window.mw.close();
	}	
var scroll = 0;

x=w;
y=h;
xresnow = x;
yresnow = y;
if (navigator.appVersion.indexOf("Mac")!=-1 && document.all) {
xresnow-=0;
yresnow-=0;
}
xl = (screen.availWidth/2)-(xresnow/2);
tt = (screen.availHeight/2)-(yresnow/2);
  if (document.all) mw=window.open(url,'new_win','scrollbars='+scroll+',width='+xresnow+',height='+yresnow+',left='+xl+',top='+tt);
  else {
    if (parseFloat(navigator.appVersion)<4.75)
      mw=window.open(url,wname,'left='+xl+',top='+tt+',width='+x+',height='+y+',toolbar=0,status=0,location=0,resizable=no,scrollbars='+scroll);
    else {
      mw=window.open(url,wname,'left='+xl+',top='+tt+',width='+x+',height='+y+',toolbar=0,status=0,location=0,resizable=no,scrollbars='+scroll);
    }
  }
}

function iur_popup(url,scroll){
	if(mw != null && !mw.closed){
		window.mw.close();
	}	

x=480;
y=420;
xresnow = x;
yresnow = y;
if (navigator.appVersion.indexOf("Mac")!=-1 && document.all) {
xresnow-=0;
yresnow-=0;
}
xl = (screen.availWidth/2)-(xresnow/2);
tt = (screen.availHeight/2)-(yresnow/2);
  if (document.all) mw=window.open(url,'new_win','scrollbars='+scroll+',width='+xresnow+',height='+yresnow+',left='+xl+',top='+tt);
  else {
    if (parseFloat(navigator.appVersion)<4.75)
      mw=window.open(url,'new_win','left='+xl+',top='+tt+',width='+x+',height='+y+',toolbar=0,status=0,location=0,scrollbars='+scroll);
    else {
      mw=window.open(url,'new_win','left='+xl+',top='+tt+',width='+x+',height='+y+',toolbar=0,status=0,location=0,scrollbars='+scroll);
    }
  }
}

function liveaction_popup(url,scroll){
if(mw != null && !mw.closed){
	window.mw.close();
}	
mw=window.open(url,'new_win','menubar=1,toolbar=1,status=1,location=1,resizable=1,scrollbars='+scroll);
}

function flash_popup(url,scroll, pagewidth,pageheight){
	if(mw != null && !mw.closed){
		window.mw.close();
	}	
x=pagewidth;
y=pageheight;
xresnow = x;
yresnow = y;
if (navigator.appVersion.indexOf("Mac")!=-1 && document.all) {
xresnow-=0;
yresnow-=0;
}
xl = (screen.availWidth/2)-(xresnow/2);
tt = (screen.availHeight/2)-(yresnow/2);
  if (document.all) mw=window.open(url,'new_win','scrollbars='+scroll+',width='+xresnow+',height='+yresnow+',left='+xl+',top='+tt);
  else {
    if (parseFloat(navigator.appVersion)<4.75)
      mw=window.open(url,'new_win','left='+xl+',top='+tt+',width='+x+',height='+y+',toolbar=0,status=0,location=0,scrollbars='+scroll);
    else {
      mw=window.open(url,'new_win','left='+xl+',top='+tt+',width='+x+',height='+y+',toolbar=0,status=0,location=0,scrollbars='+scroll);
    }
  }
}

function shop_popup(url){
	if(mw != null && !mw.closed){
		window.mw.close();
	}	
	mw=window.open(url,'new_win');
}


function next_popup(url,scroll, pagewidth,pageheight,name){
x=pagewidth;
y=pageheight;
xresnow = x;
yresnow = y;
if (navigator.appVersion.indexOf("Mac")!=-1 && document.all) {
xresnow-=0;
yresnow-=0;
}
xl = (screen.availWidth/2)-(xresnow/2);
tt = (screen.availHeight/2)-(yresnow/2);
  if (document.all) newwin=window.open(url,name,'scrollbars='+scroll+',width='+xresnow+',height='+yresnow+',left='+xl+',top='+tt);
  else {
    if (parseFloat(navigator.appVersion)<4.75)
      newwin=window.open(url,name,'left='+xl+',top='+tt+',width='+x+',height='+y+',toolbar=0,status=0,location=0,scrollbars='+scroll);
    else {
      newwin=window.open(url,name,'left='+xl+',top='+tt+',width='+x+',height='+y+',toolbar=0,status=0,location=0,scrollbars='+scroll);
    }
  }
 
 window.close();
}

function flash_popup2(url,scroll, pagewidth,pageheight){
	if(mw != null && !mw.closed){
		window.mw.close();
	}	
x=pagewidth;
y=pageheight;
xresnow = x;
yresnow = y;
if (navigator.appVersion.indexOf("Mac")!=-1 && document.all) {
xresnow-=0;
yresnow-=0;
}
xl = (screen.availWidth/2)-(xresnow/2);
tt = (screen.availHeight/2)-(yresnow/2);
  if (document.all) mw=window.open(url,'new_win','scrollbars='+scroll+',width='+xresnow+',height='+yresnow+',left='+xl+',top='+tt);
  else {
    if (parseFloat(navigator.appVersion)<4.75)
      mw=window.open(url,'new_win','left='+xl+',top='+tt+',width='+x+',height='+y+',toolbar=0,status=0,location=0,scrollbars='+scroll);
    else {
      mw=window.open(url,'new_win','left='+xl+',top='+tt+',width='+x+',height='+y+',toolbar=0,status=0,location=0,scrollbars='+scroll);
    }
  }
}


