﻿function popup_win_b(url){
	var win;
	var wleft = 0; var wtop = 0;
	if (window.screen.width > 800) wleft = (window.screen.width - 800) / 2; else wleft = 0;
	if (window.screen.height > 250) wtop = (window.screen.height - 250) / 2; else wtop = 0;
	//"toolbar=false,top=" + wtop + ",left=" + wleft + ",width=800,height=400";
	var wstyle = "resizable,scrollbars,top=" + wtop + ",left=" + wleft + ",width=800,height=250";
	win = window.open(url, "", wstyle);
	//return win; 
}

function popup_win(url){
	var win;
	var wleft = 0; var wtop = 0;
	if (window.screen.width > 800) wleft = (window.screen.width - 800) / 2; else wleft = 0;
	if (window.screen.height > 380) wtop = (window.screen.height - 380) / 2; else wtop = 0;
	//"toolbar=false,top=" + wtop + ",left=" + wleft + ",width=800,height=400";
	var wstyle = "resizable,scrollbars,top=" + wtop + ",left=" + wleft + ",width=800,height=380";
	win = window.open(url, "", wstyle);
	//return win;
}

function popup_win_default(url){
	var win;
	var wleft = 0; var wtop = 0; var wwidth = 800;
	if (window.screen.width > 1000) {
		wleft = (window.screen.width - 1000) / 2;
		wwidth = 1000;
	} else {
		if (window.screen.width > 800) wleft = (window.screen.width - 800) / 2; else wleft = 0;
		wwidth = 800;
	}
	if (window.screen.height > 600) wtop = (window.screen.height - 600) / 2; else wtop = 0;
	//"toolbar=false,top=" + wtop + ",left=" + wleft + ",width=800,height=400";
	var wstyle = "resizable,scrollbars,top=" + wtop + ",left=" + wleft + ",width=" + wwidth + ",height=600";
	win = window.open(url, "", wstyle);
	//return win;
}

function openQuickLinks(idx){
	var eid = "div_ql_" + idx;
	var eidt = "div_quick_title_" + idx;
	var eql = document.getElementById(eid);
	var eqlt = document.getElementById(eidt);		
	if (eql.style.display=="none"){
		eql.style.display="";
		eqlt.className="div_quick_title_show";
	}else{
		eql.style.display="none";
		eqlt.className="div_quick_title";
	}
}

function switchChkValue(chk){
	chk.checked = !chk.checked;
}
//try{
//var x = document.getElementById("XEadLeaderboardConvert");
//x.style.display="none";
//}catch (e){
//    alert(e);
//}
//alert("test");