
// MS IE ActiveX Rollup Patch
function __ws__(id){
   document.write(id.innerHTML);
    id.id="";
}


// ¸ÞÀÎÇ®Ã¢
function goFullscreen() {
	var URLen="../signature/main.html";
	var windowNamen="";
	var browserName=navigator.appName;
	var operatingSystem=navigator.platform;
	var version = parseFloat(navigator.appVersion);


	// Netscape check version 4.0+ on Win
	if (browserName.indexOf("Netscape")!=-1 && version>=4.0 && operatingSystem.indexOf("Mac")!=-1)
	 {
	 window.open(URLen,windowNamen,'titlebar=no,top=0,left=0,width=' + window.screen.availWidth+',height='+window.screen.availWidth+',screenX=0,screenY=0,top=0,left=0')
	 }

	// MSIE Mac check
	else if (browserName.indexOf("Microsoft Internet Explorer")!=-1 && operatingSystem.indexOf("Mac")!=-1)
	 {
	 window.open(URLen,windowNamen,'titlebar=no,top=0,left=0,width=' + window.screen.availWidth+',height='+window.screen.availWidth+',screenX=0,screenY=0,top=0,left=0')
	 }

	// Netscape Mac check
	else if (browserName.indexOf("Netscape")!=-1 && operatingSystem.indexOf("Mac")!=-1)
	 {
	 window.open(URLen,windowNamen,'width='+screen.width+',height='+screen.height+',top=0,left=0');
	 }

	// MSIE Windows
	else if (browserName.indexOf("Microsoft Internet Explorer")!=-1 && operatingSystem.indexOf("Win")!=-1)
	 {
	 //window.open(URLen,windowNamen,'fullscreen=yes')
	var win = window.open(URLen,windowNamen,'fullscreen=yes, titlebar=0,toolbar=0,location=0,directories=0,status=0,menubar=0,scroll=0,scrollbars=0,resizable=0,top=0,left=0,width=' + window.screen.availWidth+',height='+window.screen.availHeight+',screenX=0,screenY=0,top=0,left=0, statusbar=0')
		win.resizeTo(screen.width, screen.height);
		 //win.moveTo(1, 1);
		 //win.moveTo(0, 0);
		 //win.resizeTo(screen.width, screen.height);
	 }

	// Netscape Windows
	else if (browserName.indexOf("Netscape")!=-1 && operatingSystem.indexOf("Win")!=-1)
	 {
	 window.open(URLen,windowNamen,'width='+screen.width+',height='+screen.height+',top=0,left=0');
	 }

	else
	 {
	 window.open(URLen,windowNamen);
	 }
   	

}


function people_reload() {
	people_input.style.setExpression("left","3000");
    people_input.style.setExpression("top","150");
	document.people.location.href = "https://www.cyon.co.kr/event/signature/post.jsp";
}

function people_show(e_type,lan,fon,mes,s_type,o_img){
	sign_page_hide()
    people_input.style.setExpression("left","(document.body.clientWidth) / 2 - 450");
    people_input.style.setExpression("top","(document.body.clientHeight) / 2 - 175");
	people.location.href ="https://www.cyon.co.kr/event/signature/post.jsp?eng_type="+e_type+"&languages="+lan+"&fonts="+fon+"&messages="+mes+"&star_type="+s_type+"&ori_img="+o_img;
	
   document.recalc(true);

}

function people_show2(){
    people_input.style.setExpression("left","(document.body.clientWidth) / 2 - 450");
    people_input.style.setExpression("top","(document.body.clientHeight) / 2 - 175");
	sign_page_hide()
   document.recalc(true);

}


function sign_page_show(){
    sign_form.style.setExpression("left","(document.body.clientWidth) / 2 - 450");		
    sign_form.style.setExpression("top","(document.body.clientHeight) / 2 - 175");
}

function sign_page_hide() {
	sign_form.style.setExpression("left","3000");
    sign_form.style.setExpression("top","150");
}


function sign_out(){
	//alert("sign_out")
	callExternalInterface()
	sign_page_hide()
}

function callExternalInterface() {
	
    thisMovie("base").goHome();
}

function thisMovie(movieName) {

    if (navigator.appName.indexOf("Microsoft") != -1) {
        return window[movieName]
    }
    else {
        return document[movieName]
    }
}




function main_new1() {
	window.open("main.html","mainOpenFull","fullscreen=yes,scrollbars=no");
}


function main_new() {
  var height = screen.availHeight - 15;
  var width = screen.availWidth - 10;

  window.open("main.html", "question", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,width=" + width + ",height=" + height + ",top=0,left=0");
 }

function picture_apply()
{
    var winl = (screen.width - 300) / 2;
    var wint = (screen.height - 250) / 2;
    window.open("event/picture_apply.htm","apply","width=300, height=250, Scrollbars=no, top="+wint+", left="+winl); 
}

function photo_apply()
{
    var winl = (screen.width - 700) / 2;
    var wint = (screen.height - 500) / 2;
    window.open("whosleep_story_mail.htm","photo","width=700, height=500, Scrollbars=no, top="+wint+", left="+winl); 
}

function poll_apply()
{
    var winl = (screen.width - 400) / 2;
    var wint = (screen.height - 400) / 2;
    window.open("event/poll_apply.htm","poll","width=400, height=400, Scrollbars=no, top="+wint+", left="+winl); 
}


function popup2()
{
    var winl = screen.width - 300;
    //var wint = (screen.height - 700) / 2;
    window.open("http://movie.interpark.com/Movie/Event/whosleep_coupon_pop.html","newwindow1","width=505,height=353, Scrollbars=no, top=0, right="+winl); 
}


// ÀÌº¥Æ®½ÅÃ»³»¿ªÈ®ÀÎÆË¾÷
function popup_apply(){
newwin=window.open("https://www.cyon.co.kr/event/signature/event_search.jsp","newwindow1","toolbar=no,top=0,left=0,directories=no,status=no,titlebar=no,menubar=no,scrollbars=yes,resizable=no,width=420,height=400")
}

function popup3(){
newwin=window.open("event/bodyguard_apply.htm","newwindow1","toolbar=no,top=0,left=0,directories=no,status=no,titlebar=no,menubar=no,scrollbars=no,resizable=no,width=390,height=570")
}

