<!--//

function PopUpWindow(URL, N, W, H, S) { // name, width, height, scrollbars
	var winleft	=	(screen.width - W) / 2;
	var winup	=	(screen.height - H) / 2;
	winProp		=	'width='+W+',height='+H+',left='+winleft+',top='+winup+',scrollbars='+S+',resizable' + ',status=yes'
	Win			=	window.open(URL, N, winProp)
	if (parseInt(navigator.appVersion) >= 4) { Win.window.focus(); }
}


function confirmBox(strUrl) {
	PopUpWindow(strUrl,'SHConfirmBox',500,150,'no');
}



function confirmAlert(strText,strUrl) {
	var answer = confirm (strText);
	if (answer) {
		window.location = strUrl;
	}
}



function jumpMenu(targ,selObj,restore){   
	if (selObj.options[selObj.selectedIndex].value != "") {
		eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
		if (restore) selObj.selectedIndex=0;
	}
}



function setDiv (strDivName,strDivData) {
	document.getElementById(strDivName).innerHTML = strDivData;
}

function getDiv (strDivName) {
	return document.getElementById(strDivName).innerHTML;
}

function clearDiv (strDivName) {
	document.getElementById(strDivName).innerHTML = '';
}

function hideDiv (strDivName) {
	document.getElementById(strDivName).style.display = 'none';
}

function showDiv (strDivName) {
	document.getElementById(strDivName).style.display = '';
}

function getDivDisplay (strDivName) {
	return document.getElementById(strDivName).style.display;
}



// สำหรับให้ Flash เรียก Light Box   (height=400 & width=380)
function getLightBox(url,width,height){
	//?RestaurantId=106&KeepThis=true&TB_iframe=true&height=400&width=380&modal=true
	if(url){
		//tb_show(null, url+'?modal=true&TB_iframe=true', null);
		tb_show(null, url+'?RestaurantId=106&KeepThis=true&TB_iframe=true&height='+height+'&width='+width+'&modal=true', null);
	}
}

//-->