
//pop up
var mwin = null;
window.onbeforeunload = function (evt) { // This event handler works in IE4+ for Windows only
	if (typeof evt == 'undefined') {
		evt = window.event;
	}
	if (evt) {
		if(mwin != null){
			if(!mwin.closed){mwin.close()}
		}	
	}
}
window.onunload = function (){
	if(!InternetExplorer){
		closeAll()
	}
}
function NewWindow(mypage, myname, w, h, scroll, resizable) {
	myname="wpopup"
	if(mwin != null){
		if(!mwin.closed){mwin.close()}
	}
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'+resizable
	mwin = window.open(mypage, myname, winprops);
	if (parseInt(navigator.appVersion) >= 4) { mwin.window.focus(); }
}
//call by flash
function goUrldindo(){
	NewWindow('Dindo.html','brand','500','330','no')
	}
function goUrlDitoMito(){
	NewWindow('DitoMito.html','brand','500','330','no')
	}
function goUrlVip(){
	NewWindow('VipMobile.html','brand','500','330','no')
	}
//preload menu backgrounds
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}