

//Ê§Ç¹ÅÔ¢ÊÔ·¸Ôì
function Copyright(msg){
	var msg=msg;
	function rightclick()
	{
		if(event.button==2){
			alert(msg);
		}
	}
	document.onmousedown=rightclick;
	if(document.layers){
			window.captureEvents(Event.Mousedown);
	}
}

//à»Ô´Ë¹éÒµèÒ§àµçÁ¨Í
function openFullscreen(page) {

//Change browser settings for application
var yes = 1;
var no = 0;
var menubar = no; // The File, Edit, View Menus
var scrollbars = yes; // Horizontal and vertical scrollbars
var locationbar = yes; // The location box with the site URL
var directories = no; // the "What's New", "What Cool" links
var resizable = no; // Can the window be resized?
var statusbar = yes; // Status bar (with "Document: Done")
var toolbar = yes; // Back, Forward, Home, Stop toolbar

windowprops = "width=" + (screen.width-10) + ",height=" + (screen.height-50) + ",top=0,left=0";

windowprops += (menubar ? ",menubars" : "") +
(scrollbars ? ",scrollbars" : "") +
(locationbar ? ",location" : "") +
(directories ? ",directories" : "") +
(resizable ? ",resizable" : "") +
(statusbar ? ",status" : "") +
(toolbar ? ",toolbar" : "");

window.open(page, 'fullPopup', windowprops);
window.opener=null;
window.close();
}

function screenResolution() {
//Check screen resolution & give the user a message if their resolution is less than 1024 (width) x 768 (height)
if ((screen.width == 640) && (screen.height == 480)) 
size = "640 x 480";
else if ((screen.width == 800) && (screen.height == 600))
size = "800 x 600";
else size = "the default 1024 x 768";
if ((screen.width<1024) && (screen.height<768))
var answer = confirm ("Your screen resolution is set to " + size + ". \n\nThis application is best viewed in 1024 x 768. Click OK to view directions on how to change your screen resolution settings. Click CANCEL to continue loading the application.")
if (answer==true) 
window.location="http://servername/help/screenresolution.doc";
else openFullscreen()
}
// End -->

//¿Ñ§¡ìªÑ¹ áÍ´ä» Favorit
function addFavorite(url,title)
{
	if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4)) {
		window.external.AddFavorite(url,title);
	}
	// End -->
}

//à»Ô´ Fullscreen
function modeFullscreen(page)
{
	window.open(page,null,"fullscreen=yes,channelmode=no,scrollbars=yes,resizable=no,status=no,toolbar=no,directories=no");
}

//Open Popupwindow
function openPopup(page,left,top,width,height)
{
	var windowprops="resizable=0,width="+width+",height="+height+",left="+left+",top="+top+",scrollbars=yes";
	window.open(page,'_blank',windowprops);
	//window.open('popup.php','_blank','resizable=0,width=270,height=350,left=0,top=0,scrollbars=yes');
}

//confirm
function confirmentry(msg,link)
{
	if(confirm(msg)){
		location.href=link;
	}
}


//closewindow
function closewindow()
{
	window.close();
}



//Êè§µÑÇá»ÃÍÍâµäÍ´Õ
function sendautoid(id) {
      document.all.hdauto_id.value=id;
}


//add smiley
function addsmiley(code)
{
	var pretext = document.all.detail.value;	
	this.code = code;
	document.all.detail.value = pretext + code;
}

//refresh Ë¹éÒµèÒ§áÁè
function refreshmainwindow() {
	// this will close the pop up window
	window.close();
	// this will reload the parent window...
	if (!window.opener.closed) {
	window.opener.location.reload();
	window.opener.focus();
	}
}

function refreshmainwindow1() {
	opener.focus();
	opener.location.href = opener.location;
	self.close();
}


