//document.domain="samsungmobile.com";

function messageBox(msg, modal){
	document.frm_msg.msg.value		= msg;
	if(modal!=null && modal){
		document.frm_msg.modal.value = 1;
	}else{
		document.frm_msg.modal.value = 0;
	}
	//var url = url_root+"co/messagebox.jsp?msg="+msg+"&modal="+modal;
	//FFWindowOpen(WINDOW_ALIGN_CENTER,url,"message",330,130,"");

	document.frm_msg.target = "message";
	FFWindowOpen(WINDOW_ALIGN_CENTER,"about:blank","message",330,130,"");
	document.frm_msg.action = url_root+"co/messagebox.jsp";
	document.frm_msg.submit();
}

function messageBox2(msg, modal){
	document.frm_msg.msg.value		= msg;
	if(modal!=null && modal){
		document.frm_msg.modal.value = 1;
	}else{
		document.frm_msg.modal.value = 0;
	}
	//var url = url_root+"co/messagebox.jsp?msg="+msg+"&modal="+modal;
	//FFWindowOpen(WINDOW_ALIGN_CENTER,url,"message",330,130,"");

	document.frm_msg.target = "message";
	FFWindowOpen(WINDOW_ALIGN_CENTER,"about:blank","message",330,130,"");
	document.frm_msg.action = url_root+"co/messagebox2.jsp";
	document.frm_msg.submit();
}

function CloseMsg(){
}

/*function confirmBox(msgtype, msg , modal){
	document.frm_msg.msgtype.value	= msgtype;
	document.frm_msg.msg.value		= msg;
	if(modal!=null && modal){
		document.frm_msg.modal.value = 1;
	}else{
		document.frm_msg.modal.value = 0;
	}

	var url = url_root+"co/confirmBox.jsp?msgtype="+msgtype+"&msg="+msg+"&modal="+modal;
	FFWindowOpen(WINDOW_ALIGN_CENTER,url,"message",330,130,"");

	//FFWindowOpen(WINDOW_ALIGN_CENTER,"about:blank","message",300,120,"");
	//document.frm_msg.action = url_root+"co/confirmBox.jsp";
	//document.frm_msg.submit();
}*/

function loginAlert(){
	FFWindowOpen(WINDOW_ALIGN_CENTER, url_root+"co/login_alert.jsp", "login", 330, 130,"");
}

function emessageAlert() {
	FFWindowOpen(WINDOW_ALIGN_CENTER, url_root+"co/emessage_alert.jsp", "emessage", 330, 130,"");
}

function goMenu(menu1,menu2,menu3){
    if(menu3==null) menu3="";

	document.location.href = url_root+"gomenu.jsp?menu1=" + menu1 + "&menu2=" + menu2 + "&menu3=" + menu3;
}

function goHome(){
	document.location.href = url_root+"index.jsp";
}

function logout(){
	document.location.href = url_root+"member/xt_logout.jsp";
}

function goJoin() {
    if(url_root.indexOf("dev")== -1)
        FFWindowOpen(WINDOW_ALIGN_CENTER, "https://sfcasia.samsungmobile.com/tha/th/member/register_01.jsp", "register", 700, 680,"scrollbars=yes");
    else
      FFWindowOpen(WINDOW_ALIGN_CENTER, "https://dev.sfcasia.samsungmobile.com/tha/th/member/register_01.jsp", "register", 700, 680,"scrollbars=yes");
}
function goJoin(eName, eCode) {
	if (eName==null || eCode==null)
	{
		eName='';
		eCode='';
	}
	if(url_root.indexOf("dev")== -1) FFWindowOpen(WINDOW_ALIGN_CENTER, "https://sfcasia.samsungmobile.com/tha/th/member/register_01.jsp?p_member_gbn="+eCode+"&p_register_gbn="+eName, "register", 700, 680,"scrollbars=yes");
    else FFWindowOpen(WINDOW_ALIGN_CENTER, "https://dev.sfcasia.samsungmobile.com/tha/th/member/register_01.jsp?p_member_gbn="+eCode+"&p_register_gbn="+eName, "register", 700, 680,"scrollbars=yes");
}
function goWapjoin(param1, param2) {
	if(url_root.indexOf("dev")== -1) FFWindowOpen(WINDOW_ALIGN_CENTER, "https://sfcasia.samsungmobile.com/tha/th/member/wap_register.jsp?A1u03Bw="+param1+"&L83hdfu="+param2, "wap_join", 564, 720,"scrollbars=yes");
  else FFWindowOpen(WINDOW_ALIGN_CENTER, "https://dev.sfcasia.samsungmobile.com/tha/th/member/wap_register.jsp?A1u03Bw="+param1+"&L83hdfu="+param2, "wap_join", 564, 720,"scrollbars=yes");
}

function goPointFaq() {
	document.location.href = url_root+"club/bbs/notice_qry.jsp?p_bbscode=notice&p_pagenum=1&p_num=33";
}
function goPhoneDownload()
{
	// document.location.href = "/webfiles/about_phone_settings.pdf";
    FFWindowOpen(WINDOW_ALIGN_CENTER, url_root+"member/about_ph_setting.jsp", "", 581, 665,"scrollbars=yes");
}
function viewMessage() {
	document.location.href = url_root+"gomenu.jsp?menu1=talk&menu2=3&menu3=02";
}

function goTermination() {
	FFWindowOpen(WINDOW_ALIGN_CENTER,url_root+"member/termination.jsp","termination",500,405,"");
}

function logout_termination(){
	document.location.href = url_root+"member/xt_logout.jsp?p_term=y";
}

/*function passwordBefore() {
	FFWindowOpen(WINDOW_ALIGN_CENTER,url_root+"member/password_id.jsp?cmd=before","passwordBefore",390,196,"");
}*/
function survey_pop() {
	window.open(url_root+"club/event/survey/survey_main.jsp","","toolbar=no,channelmode=no,location=no,directories=no,width=600,height=475,resizable=no,menubar=no,scroll=no");
}

function forgot_id() {
	FFWindowOpen(WINDOW_ALIGN_CENTER,url_root+"member/forgot_id.jsp","idBefore",321,210,"");
}

function forgot_password() {
        FFWindowOpen(WINDOW_ALIGN_CENTER,url_root+"member/forgot_password.jsp","idBefore",388,218,"");
}

function change_password() {
	FFWindowOpen(WINDOW_ALIGN_CENTER,url_root+"member/password_change.jsp","passwordAfter",370,310,"");
}

function whyRegister() {
	FFWindowOpen(WINDOW_ALIGN_CENTER,url_root+"member/whyregister.jsp","whyRegister",380,265,"");
}
/*
function pinConfirmSMS() {
	FFWindowOpen(WINDOW_ALIGN_CENTER,url_root+"member/pin_confirm.jsp?type=SMS","pin",450,273,"");
	if(window.opener!=null){
		self.close();
	}
}*/
function phone_check()
{
	document.location.href = url_root+"/me/myphone/phone_view.jsp";
}

function go_register_auth()
{
	document.location.href= url_root+"/me/myphone/phone_view2.jsp";
}
function go_phone_feature()
{
	//ysk add 2006.05.11
	document.location.href = url_root+"/phone/phone_view/phone_feature.jsp?p_main=1&p_pfid_1=SGH-U600";
}
function f_activate() {
  var obj = new Array("OBJECT", "EMBED");
  var vTarget = null;

  for (i = 0; i < obj.length; i++) {
    vTarget = document.getElementsByTagName(obj[i]);
    for (j = 0; j < vTarget.length; j++) {
        vTarget[j].outerHTML = vTarget[j].outerHTML;
    }
  }
}
function writeFlash(url_root, width, height, bgcolor,version, name){
   document.write("<object name='"+name+"' classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' \n"
      +" codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version="+version+"' \n"
      +" width='"+width+"' height='"+height+"'> \n"
      +"<param name='menu' value='false'>\n"
      +"<param name='movie' value='"+url_root+"'>\n"
      +"<param name='quality' value='high'>\n"
      +"<param name='bgcolor' value='"+bgcolor+"'>\n"
      +"<param name='wmode' value='transparent'>\n"
      +"<embed src='"+url_root+"' "
      +" wmode='transparent' quality='high' bgcolor='"+bgcolor+"'  width='"+width+"' height='"+height+"' "
      +" type='application/x-shockwave-flash' "
      +" pluginspage='http://www.macromedia.com/shockwav/download/index.cgi?P1_Prod_Version=ShockwaveFlash'>\n"
      +"</embed></object>\n");
}
function writeWPlay(url_root, width, height, name){
  document.write("<embed src='"+url_root+"' width='"+width+"' height='"+height+"' \n"
          +"vspace='0' hspace='0' border='0' type='video/x-ms-asf' filename='"+url_root+"' \n"
          +"transparentatstart='1' autostart='1' animationatstart='1' autoresize='0' showcontrols='1' \n"
          +"showcaptioning='0' showstatusbar='0' autosize='0' showdisplay='0' displaysize='0'>");
}

