function Comma(number) {
   number = numberFilter(number);
   number = '' + number;
   if (number.length > 3) {
   var mod = number.length % 3;
   var output = (mod > 0 ? (number.substring(0,mod)) : '');
   for (i=0 ; i < Math.floor(number.length / 3); i++) {
   if ((mod == 0) && (i == 0))
   output += number.substring(mod+ 3 * i, mod + 3 * i + 3);
   else
   output+= ',' + number.substring(mod + 3 * i, mod + 3 * i + 3);
}
   return (output);
}
   else return number;
}

function stringFilter (string) {
 sfilter = string;
 filteredValues = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
 var i;
 var returnString = "";
 for (i = 0; i < sfilter.length; i++) {
	var c = sfilter.charAt(i);
	if (filteredValues.indexOf(c) != -1) returnString += c;
 }
 return returnString;
}

function numberFilter (string) {
 sfilter = string;
 filteredValues = "1234567890";
 var i;
 var returnString = "";
 for (i = 0; i < sfilter.length; i++) {
	var c = sfilter.charAt(i);
	if (filteredValues.indexOf(c) != -1) returnString += c;
 }
 return returnString;
}

function get_cookie(name) {
	var cname = name + "=";
	var allcookies = document.cookie;
	var pos = allcookies.indexOf(cname);
	if (pos != -1) {
	var start = pos + cname.length;
	var end = allcookies.indexOf(";", start);
	if (end == -1) end = allcookies.length;
		return(unescape(allcookies.substring(start,end)));
	}
	return("");
}

//opens a popup window
function OpenWindow (url,width,height) {
	OpenWin = window.open(url, "CtrlWindow", "status=no,toolbar=no,directories=no,menubar=no,scrollbars=yes,resizable=yes,width="+ width + ",height=" + height + ",left=75,top=75");
}

//returns HTML for shared header with a different
//image dependent on if the user is logged in
function GetHeaderLogin(location) {
	var WorldPerks = get_cookie("WorldPerks");
	if (WorldPerks != "") { 
		if (location == "HOMEPAGE") {
			return ('<td><img src="/asia/jp/images/shared/header/topnav_sub_logout_jp_jp.gif" border="0" width="465" height="29" usemap="#topnav_sub_logout_map" alt=""></td>'); 
		} else {
			return ('<td><img src="/asia/jp/images/shared/header/topnav_sub_logout_others_jp_jp.gif" border="0" width="465" height="29" usemap="#topnav_sub_logout_map" alt=""></td>'); 
		}
	} else {
		if (location == "HOMEPAGE") {
			return ('<td><img src="/asia/jp/images/shared/header/topnav_sub_login_jp_jp.gif" border="0" width="465" height="29" usemap="#topnav_sub_login_map" alt=""></td>'); 
		} else {
			return ('<td><img src="/asia/jp/images/shared/header/topnav_sub_login_others_jp_jp.gif" border="0" width="465" height="29" usemap="#topnav_sub_login_map" alt=""></td>'); 
		}
	}
}

function GetWPWelcome() {
	var WorldPerks = get_cookie("WorldPerks");
	if (WorldPerks != "") {
		var cookie_flds = WorldPerks.split('&');	 	
		return ('<span class="wplogin-name">'+cookie_flds[2]+' '+cookie_flds[1]+'</span><br>会員資格： '+cookie_flds[4]+' member<br>\n'+Comma(cookie_flds[6])+' 使用可能マイル残数\n'); 
	} else {
		return ('ワールドパークスへのログインは <a href="https://www.nwa.com/cgi-bin/jp/wp_acctsum.pro">こちら</a> から'); 
	}
}

//turn the subnav link row on or off by changing background/text
//color and associated arrow image
function SubNavLink(element, mode) {

	if ((document.getElementById) || (document.all)) {

		//defaults
		var arrowImage = element + "Arrow";	
		var bgColor = '#E5E6EF';
		var txtColor = '#233385';
		var arrowImg = 'arrowRightOn';
	
		//reassign background and text colors dependent on mode
		if (mode == 'over') {
			bgColor = '#CC0000';		
			txtColor = '#FFFFFF';
			arrowImg = 'arrowRightOn';
		} else if (mode == 'out') {
			arrowImg = 'arrowRightOff';			
		} else if (mode == 'over-open') {
			arrowImg = 'arrowDownOn';		
			bgColor = '#CC0000';				
			txtColor = '#FFFFFF';									
		} else if (mode == 'out-open') {
			arrowImg = 'arrowDownOff';							
		}
	
		//modern browsers
		if (document.getElementById) {	
		
			var navTxt = document.getElementById(element + "Txt");
			var arrowCell = document.getElementById(element + "ArrowCell");
	
			//change colors, swap image
			document.getElementById(element).style.backgroundColor = bgColor;
			if (arrowCell) { arrowCell.style.backgroundColor = bgColor; }
			if (document.images[arrowImage]) { SwapImage(arrowImage, arrowImg); }		
			if (navTxt) { navTxt.style.color = txtColor; }				
		
		//IE 4	
		} else if (document.all) {
			
			var navTxt = document.all(element + "Txt");
			var arrowCell = document.all(element + "ArrowCell");		
	
			//change colors, swap image
			document.all(element).style.backgroundColor = bgColor;
			if (arrowCell) { arrowCell.style.backgroundColor = bgColor; }
			if (document.images[arrowImage]) { SwapImage(arrowImage, arrowImg); }		
			if (navTxt) { navTxt.style.color = txtColor; }			
		}
	}
}

//replace a given img src with passed reference
function SwapImage(imgDocID,imgObjName) {
 if (document.images) {
		document.images[imgDocID].src = eval(imgObjName + ".src")
 }
}

/* run-time */

/* preload sub nav arrow images */
if (document.images) {
	 var arrowRightOn = new Image(13,14);
	 arrowRightOn.src = "/images/shared/subnav/arrow_right_on.gif";
	 var arrowRightOff = new Image(13,14);
	 arrowRightOff.src = "/images/shared/subnav/arrow_right_off.gif";
	 var arrowDownOn = new Image(13,14);
	 arrowDownOn.src = "/images/shared/subnav/arrow_down_on.gif";
	 var arrowDownOff = new Image(13,14);
	 arrowDownOff.src = "/images/shared/subnav/arrow_down_off.gif";			 
}

function leapto(form) {
	var myindex=form.dest.selectedIndex
	location.href=(form.dest.options[myindex].value);
}

function Cookie(document, name, hours, path, domain, secure)
{
	// All the predefined properties of this object begin with 'N'
	// to distinguish them from other properties which are the values to
	// be stored in the cookie.
    
	name = 'nwa';
	domain = '.pclunix.pacificintranet.com';
	this.Ndocument = document;
    	this.Nname = name;
    	if (hours)
        	this.Nexpiration = new Date((new Date()).getTime() + hours*3600000);
    	else this.Nexpiration = null;
    	if (path) this.Npath = path; else this.Npath = null;
    	if (domain) this.Ndomain = domain; else this.Ndomain = null;
    	if (secure) this.Nsecure = true; else this.Nsecure = false;
}

// This function is the store() method of the Cookie object
function _Cookie_store()
{
	// First, loop through the properties of the Cookie object and
    	// put together the value of the cookie.  Since cookies use the
    	// equals sign and semicolons as separators, we'll use colons
    	// and ampersands for the individual state variables we store
    	// within a single cookie value.  Note that we escape the value
    	// of each state variable, in case it contains punctuation or other
    	// illegal characters.
    	var cookieval = "";
    	for(var prop in this) {
        	// ignore properties with names that begin with 'N' and also methods
        	if ((prop.charAt(0) == 'N') || ((typeof this[prop]) == 'function'))
            		continue;
        	if (cookieval != "") cookieval += '&';
       		cookieval += prop + ':' + escape(this[prop]);
	}

	// Now that we have the value of the cookie, put together the
    	// complete cookie string, which includes the name, and the various
    	// attributes specified when the Cookie object was created.
    	var cookie = this.Nname + '=' + cookieval;
    	if (this.Nexpiration)
        	cookie += '; expires=' + this.Nexpiration.toGMTString();
    	if (this.Npath) cookie += '; path=' + this.Npath;
    	if (this.Ndomain) cookie += '; domain=' + this.Ndomain;
    	if (this.Nsecure) cookie += '; secure';

    	// Now store the cookie by setting the magic Document.cookie property
    	this.Ndocument.cookie = cookie;
}

	// This function is the load() method of the Cookie object
	function _Cookie_load()
		{
    			// First, get a list of all cookies that pertain to this document.
    			// We do this by reading the magic Document.cookie property
    			var allcookies = this.Ndocument.cookie;
     
			if (allcookies == "") return false;

		  	// Now extract just the named cookie from that list.
    			var start = allcookies.indexOf(this.Nname + '=');
    			if (start == -1) return false;   // cookie not defined for this page.
    			start += this.Nname.length + 1;  // skip name and equals sign.
    			var end = allcookies.indexOf(';', start);
    			if (end == -1) end = allcookies.length;
    			var cookieval = allcookies.substring(start, end);
			// Now that we've extracted the value of the named cookie, we've
    			// got to break that value down into individual state variable
    			// names and values.  The name/value pairs are separated from each
    			// other with ampersands, and the individual names and values are
    			// separated from each other with colons.  We use the split method
    			// to parse everything.
			// THIS CODE WILL NOT WORK WITH IE3.0
   			//var a = cookieval.split('&');
   			var a = ie3split(cookieval,"&");   // break it into array of name/value pairs
   			for(var i=0; i < a.length; i++)        // break each pair into an array
   			{
     				//a[i] = a[i].split(':');    
     				a[i] = ie3split(a[i],":");
   			}
 
			//USE THIS INSTEAD
			// Now that we've parsed the cookie value, set all the names and values
    			// of the state variables in this Cookie object.  Note that we unescape()
    			// the property value, because we called escape() when we stored it.
    			for(var i = 0; i < a.length; i++) {
        			this[a[i][0]] = unescape(a[i][1]);
    			}

		    // We're done, so return the success code
    		return true;
	}

function ie3split(stringtosplit, splitchar)
{
	var orgstring = stringtosplit;
	var ie3splitarray = new Array();
	var j = 0;
	while (orgstring.indexOf(splitchar) != -1)

	{
		ie3splitarray[j] = orgstring.substring(0,orgstring.indexOf(splitchar));
		orgstring=orgstring.substring(orgstring.indexOf(splitchar)+1,orgstring.length);
		j++;
	}
	ie3splitarray[j] = orgstring;
	return ie3splitarray;
}

	// This function is the remove() method of the Cookie object.
	function _Cookie_remove()
	{
    		var cookie;
    		cookie = this.Nname + '=';
    		if (this.Npath) cookie += '; path=' + this.Npath;
    		if (this.Ndomain) cookie += '; domain=' + this.Ndomain;
    		cookie += '; expires=Fri, 02-Jan-1970 00:00:00 GMT';

		this.Ndocument.cookie = cookie;
	}
	


// function added - Raymond 19 AUG 2003
function reloadEnableButton(myForm) {
	if (myForm.AWARDS.value == "YES") {
		enableButton(false,myForm);
	} else {
		enableButton(true,myForm);
	}
}
function enableButton(enable,myForm)
{	
	
	//if (typeof document.getElementById('returnMonth') != 'undefined') {	
	//if (typeof document.getElementById('returnMonth')
	if (myForm.returnMonth) {	
		myForm.returnMonth.options.disabled = (!enable);
		myForm.returnDay.options.disabled = (!enable);
		myForm.classOfService.options.disabled = (!enable);
	}
		
	var obj1 = document.all?document.all.retCalendar:document.getElementById("retCalendar");
	var obj2 = document.all?document.all.multiFgt:document.getElementById("multiFgt");
		
	if (!enable) {

		obj2.onclick = "";
		obj2.href = "javascript:void(0)";
		myForm.returnMonth.disabled = true;
		myForm.returnDay.disabled = true;
		myForm.classOfService.disabled = true;
		myForm.TRIP_TYPE[0].checked = true;
		myForm.TRIP_TYPE[1].disabled = true;
	} else {
		obj2.onclick = "javascript:multiFlight(document.orbot)";
		obj2.href = "javascript:multiFlight(document.orbot)";
	
		if (myForm.returnMonth) {	
			myForm.returnMonth.disabled = false;
			myForm.returnDay.disabled = false;
			myForm.classOfService.disabled = false;
		}
	
		myForm.TRIP_TYPE[1].disabled = false;
	}
	
}


function newin (url)
{
popWindow = window.open(url,"popWindow","toolbar=no,directories=no,status=no,scrollbars=yes,resizable=no,menubar=no, width=710, height=550")
popWindow.opener = self;
popWindow.focus();
}
function newin (url)
{
popWindow = window.open(url,"popWindow","toolbar=no,directories=no,status=no,scrollbars=yes,resizable=no,menubar=no, width=710, height=550")
popWindow.opener = self;
popWindow.focus();
}

function newin_navigate(url)
{
	popWindow = window.open(url,"popWindow","")
	popWindow.opener = self;
	popWindow.focus();	
}

               function padout(number) { return (number < 10) ? '0' + number : number; }

               function restart() {
                       text_field1.selectedIndex = day-1;
                       text_field2.selectedIndex =( month - month1 + (12 * (month < month1))) + 0;  // Glenn made this change - it worked
                        if (text_field3 != null)
                           text_field3.selectedIndex = text_field2.selectedIndex;
                        mywindow.close();
                }
	
	        function changeReturn(myForm) {
  	                myForm.returnMonth.selectedIndex = myForm.departMonth.selectedIndex;
	        }
		
	        function moreOptions(myForm) {
	        	checkForm(myForm);
			myForm.SEARCH_TYPE.disabled = true;
	                myForm.action.value="populate";
	                myForm.submit();
  	        }
		
		function multiFlight(myForm) {
			checkForm(myForm);
	                myForm.action.value="populate";
			myForm.SEARCH_TYPE.value = "4";
			myForm.RETDATE.disabled=true;
			myForm.submit();
		}
		
		function lessOptions(myForm) {
			checkForm(myForm);
			myForm.submit();
		}
	
		function DateForm(myForm) {
			var today1 = new Date();
			 curMonth = today1.getMonth() + 1;
			 curDYear  = today1.getFullYear();
			 curRYear  = today1.getFullYear();

			if (myForm.DEPDATE0) {
				if (curMonth > myForm.departMonth.value) {
					curDYear = curDYear + 1;
				}
				myForm.DEPDATE0.value = myForm.departMonth.value + "/" + myForm.departDay.value + "/" + curDYear.toString().substring(2,4);
			}
			if (myForm.RETDATE) {
				if (curMonth > myForm.returnMonth.value) {
					curRYear = curRYear + 1;
				}
				myForm.RETDATE.value = myForm.returnMonth.value + "/" + myForm.returnDay.value + "/" + curRYear.toString().substring(2,4);
			}
		}

		function checkForm(myForm) {
			myForm.action.value = "submit";
			DateForm(myForm);
			for (i=0;i<myForm.length;i++) {
				if (myForm.elements[i].name == "SEARCHON" && myForm.elements[i].type == "radio" && myForm.elements[i].checked) {
					if (myForm.elements[i].value == "awardTravelSearch") {
						myForm.AWARDS.value = "YES";
						myForm.AWARD_LEVEL.value = "261";
						// erase
						myForm.RETDATE.value = "";
						myForm.returnDay.value = "";
						myForm.returnMonth.value = "";
						myForm.FARETYPE.value = "";		
						myForm.RETDATE.disabled=true;
						myForm.returnDay.disabled=true;
						myForm.returnMonth.disabled=true;
						myForm.FARETYPE.value = "ECONOMY";
						//myForm.SEARCH_TYPE.value = "0";
						myForm.SEARCH_TYPE.disabled = true;
						myForm.SEARCHON[0].disabled = true;
						myForm.SEARCHON[1].disabled = true;
						myForm.SEARCHON[2].disabled = true;
					} else {
						myForm.AWARDS.value = "NO";
						//myForm.SEARCHON[1].value = "price";
						myForm.AWARD_LEVEL.value = "";
						myForm.AWARD_LEVEL.disabled=true;
						if (myForm.classOfService[0].selected) {
							myForm.FARETYPE.value = "BUSINESS"
						} else {
							myForm.FARETYPE.value = "ECONOMY"
						}
					}
				}
			}
			
			if (myForm.TRIP_TYPE) {
				if(myForm.TRIP_TYPE[1].checked) {
				// One-way
					myForm.SEARCH_TYPE.value = "0";
					myForm.RETDATE.value = "";
					myForm.returnDay.value = "";
					myForm.returnMonth.value = "";
					myForm.RETDATE.disabled = true;
					myForm.returnDay.disabled = true;
					myForm.returnMonth.disabled = true;
				} else if(myForm.TRIP_TYPE[0].checked) {
					myForm.SEARCH_TYPE.value = "1";
				}
			}

			//disable non-use value
			myForm.departMonth.disabled = true;
			myForm.departDay.disabled = true;
			if (myForm.TRIP_TYPE) {
				myForm.TRIP_TYPE.disabled = true;			
				myForm.returnMonth.disabled = true;
				myForm.returnDay.disabled = true;
				myForm.classOfService.disabled = true;
				myForm.TRIP_TYPE[0].disabled = true;
				myForm.TRIP_TYPE[1].disabled = true;
			}	
			
		}
	
//added by ptogle 29 Dec 2004
var monthArr = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'];

function getMonthValue(mon) {
   for (var i=0; i<monthArr.length; i++) {
      if (monthArr[i]==mon) {
         return i;
      }
   }
}

function isNumeric(str) {
   if (str.match(/^\d+$/))
      return true;
   else
      return false;
}

function getChosenYear(typ, mon) {
   var frm = document.orbot;
   var firstMonthOnDropDown = 1;
   if (typ.match(/depart/))
      firstMonthOnDropDown = frm.departMonth.options[0].value;
   else
      firstMonthOnDropDown = frm.returnMonth.options[0].value;
  
   var current = new Date();
   var current_mon = current.getMonth();
   var current_day = current.getDate();
   var current_yr = current.getFullYear();
   chosenYear = current_yr;
   //month is not January and is less than the
   //first month on the dropdown
   //thus, month is after the current year
   if (firstMonthOnDropDown > 1 && mon < firstMonthOnDropDown) {
      chosenYear++;
   }

   return chosenYear;
}

function changeDate(typ) {
   var frm = document.orbot;
   if (typ.toLowerCase()=="depart") {
      //retrieve depart
      var selectedMonthYear = frm.departMonth.value;
      if (!(selectedMonthYear.indexOf(' ')<0)) { //check if Year is available
         var monthYearArr = selectedMonthYear.split(' ');
         var selectedMonth = monthYearArr[0];
         if (isNumeric(selectedMonth)) {
            selectedMonth = monthYearArr[0]/1;
            month = selectedMonth-1;
            year = getChosenYear(typ, selectedMonth);
         } else {
            month = getMonthValue(selectedMonth);
            year = getChosenYear(typ, getMonthValue(selectedMonth)+1);
         }
      } else {
         if (isNumeric(selectedMonthYear)) {
            selectedMonthYear = selectedMonthYear/1; //get the numeric equivalent of the chosen month.
            month = selectedMonthYear-1;
            year = getChosenYear(typ, selectedMonthYear);
         } else {
            month = getMonthValue(selectedMonthYear);
            year = getChosenYear(typ, getMonthValue(selectedMonthYear)+1);
         }
      }
      day = frm.departDay.options[frm.departDay.selectedIndex].text;
   } else {
      //retrieve return
      var selectedMonthYear = frm.returnMonth.value;
      if (!(selectedMonthYear.indexOf(' ')<0)) { //check if Year is available
         var monthYearArr = selectedMonthYear.split(' ');
         var selectedMonth = monthYearArr[0];
         if (isNumeric(selectedMonth)) {
            selectedMonth = monthYearArr[0]/1;
            month = selectedMonth-1;
            year = getChosenYear(typ, selectedMonth);
         } else {
            month = getMonthValue(selectedMonth);
            year = getChosenYear(typ, getMonthValue(selectedMonth)+1);
         }
      } else {
         if (isNumeric(selectedMonthYear)) {
            selectedMonthYear = selectedMonthYear/1; //get the numeric equivalent of the chosen month.
            month = selectedMonthYear-1;
            year = getChosenYear(typ, selectedMonthYear);
         } else {
            month = getMonthValue(selectedMonthYear);
            year = getChosenYear(typ, getMonthValue(selectedMonthYear)+1);
         }
      }
      day = frm.returnDay.options[frm.returnDay.selectedIndex].text;
   }
}
//end of addition

function newWindow(location, myForm, fieldname1,fieldname2,fieldname3,evnt) {
   if (myForm.TRIP_TYPE) {
      if (myForm.TRIP_TYPE[1].disabled == true && location == "2") {
               // nothing to do
      } else {
         //if-else block added by ptogle 29 Dec 2004
         if (fieldname1.name.match(/depart/) != null)
            changeDate('depart');
         else
            changeDate('return');
         text_field1 = fieldname1;
         text_field2 = fieldname2;
         text_field3 = fieldname3;
         var properties = "left=" + (evnt.screenX + 20);
         properties += ",top=" + (evnt.screenY + 1);
         properties += ",titlebar=0,resizable=no,width=205,height=195";

         mywindow=open('/asia/jp/cal_new.html','myname',properties);
         mywindow.location.href = '/asia/jp/cal_new.html';

         if (mywindow.opener == null) mywindow.opener = self;
         mywindow.focus();
      }
   }
   else {
      //if-else block added by ptogle 29 Dec 2004
      if (fieldname1.name.match(/depart/) != null)
         changeDate('depart');
      else
         changeDate('return');
      text_field1 = fieldname1;
      text_field2 = fieldname2;
      text_field3 = fieldname3;
      var properties = "left=" + (evnt.screenX + 20);
      properties += ",top=" + (evnt.screenY + 1);
      properties += ",titlebar=0,resizable=no,width=205,height=195";

      mywindow=open('/asia/jp/cal_new.html','myname',properties);
      mywindow.location.href = '/asia/jp/cal_new.html';

      if (mywindow.opener == null) mywindow.opener = self;
      mywindow.focus();
   }
}

		function input_WP_number() {
			var WorldPerks = get_cookie("WorldPerks");
			if (WorldPerks != "") {
				var cookie_flds = WorldPerks.split('&');
				return ('<input type="text" size="7" name="WP" maxlength="12" class="inputText" onBlur="this.value=stringFilter(this.value)" value="'+cookie_flds[0]+'">\n');
			}
			return ('<input type="text" size="7" name="WP" maxlength="12" class="inputText" onBlur="this.value=numberFilter(this.value);">');
		}

      // Added function for checkin prefills
      function checkinset() {
         var WorldPerks = get_cookie("WorldPerks");
         if (WorldPerks != "") {
            var cookie_flds = WorldPerks.split('&');
            document.form0.FirstName.value = cookie_flds[2];
            document.form0.LastName.value = cookie_flds[1];
            document.form0.WP.value = cookie_flds[0];
         }
         // start flyout code
         DQM_handleOnload();
      }
function setform(s) {
  with (document.forms.wpform) {
     document.forms.wpform.action = "https://www.nwa.com/cgi-bin/rres_info.pro?lang=jp";
     WpNum.value = account.value;
     LastName.value = name.value;
     Pin.value=pin.value;
  }
}
		function get_WP_display_info(widthparam) {
			var WorldPerks = get_cookie("WorldPerks");
         var tablewidth = 230;
         if (widthparam > 0) {
            tablewidth = widthparam;
         }
			if (WorldPerks != "") {
				var cookie_flds = WorldPerks.split('&');
				return('<table border="0" width="'+tablewidth+'" cellpadding="3" cellspacing="0" bgcolor="#B1B4C5" class="formHeader"><tr><td class="formHeader">ワールドパークス</td></tr></table>\n<img src="/images/shared/spacer_white.gif" border="0" width="'+tablewidth+'" height="1" alt=""><br>\n<table border="0" width="'+tablewidth+'" cellpadding="5" cellspacing="0" class="formTable">\n<tr>\n<td>\n<span class="wplogin-name">'+cookie_flds[2]+' '+cookie_flds[1]+'</span><br>会員資格： '+cookie_flds[4]+' member<br>\n'+Comma(cookie_flds[6])+' 使用可能マイル残数\n</td>\n</tr>\n<tr>\n<td>&nbsp;</td>\n</tr>\n<tr>\n<td valign="middle" align="center"><a href="http://www.nwa.com/jp/jp/travel/itinerary/"><img src="/asia/jp/images/shared/buttons/ViewPNR.gif" border="0" width="56" height="15" hspace="10" alt="&#20104;&#32004;&#30906;&#35469;"></a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="https://www.nwa.com/cgi-bin/jp/wp_acctsum.pro"><img src="/asia/jp/images/shared/buttons/ViewAccount.gif" border="0" width="56" height="15" hspace="10" alt="&#20250;&#21729;&#21475;&#24231;"></a></td>\n</tr>\n</table>\n');
			}
			return ('<table border="0" width="'+tablewidth+'" cellpadding="3" cellspacing="0" bgcolor="#B1B4C5" class="formHeader"><tr><td class="formHeader">ワールドパークスへのログイン</td></tr></table><img src="/images/shared/spacer_white.gif" border="0" width="230" height="1" alt=""><br>\n<table border="0" width="230" cellpadding="5" cellspacing="0" class="formTable">\n<tr>\n<td class="HomeText"><form method="post" action="https://www.nwa.com/cgi-bin/jp/wp_acctsum.pro">会員番号<br><input type="text" size="8" name="account" maxlength="12" class="inputText"></td>\n<td class="HomeText">姓 <span style="font-size:12px; position:relative; top:0px;">(Last Name)</span><br><input type="text" size="8" name="name" maxlength="40" class="inputText"></td>\n</tr>\n<tr>\n<td colspan="2" class="pad-no-top">PIN<br><input type="password" size="5" maxlength="4" name="pin"><input type="checkbox" name="save_pin" value="Y" checked />PINをPCに保存する</small></td>\n</tr>\n<tr>\n<td><span class="gtLink">&gt;</span><a href="http://www.nwa.com/jp/jp/freqfly/pinhelp.html"><span style="font-size:12px; position:relative; top:0px;">PIN</span> について</a></td>\n<td align="right"><input type="image" src="/asia/jp/images/shared/buttons/button_viewaccount.gif" border="0" width="56" height="15" alt="ログイン"><img src="/images/clear.gif" border="0" width="9" height="1" alt=""></form></td>\n</tr>\n</table>\n');
		}	

		var stylesheet = "/includes/css/styles.css";
		if (document.layers) { stylesheet = "/includes/css/styles_ns4.css"; }		
		document.write('<link rel="stylesheet" type="text/css" href="' + stylesheet + '" />');	
	
		function remove_cookie (name)
		{
		   document.cookie = name + "=; path=/; expires=Thu, 01-Jan-1970 00:00:01 GMT; domain=.nwa.com";
		}

		function logout_worldperks_home ()
		{
		   remove_cookie("WorldPerks");
		   remove_cookie("WP_PIN");
		   // alert("You have successfully logged out of WorldPerks");
			alert('ワールドパークスからログアウトしました。');
		   location = "http://www.nwa.com/jp/jp/";
		}



function newin (url)
{
popWindow = window.open(url,"popWindow","toolbar=no,directories=no,status=no,scrollbars=yes,resizable=no,menubar=no, width=730, height=550")
popWindow.opener = self;
popWindow.focus();
}
// End append

//default stylesheet name
var stylesheet = "/includes/css/styles.css";

//netscape 4 browsers use a different stylesheet
if (document.layers) {
	stylesheet = "/includes/css/styles_ns4.css";
}

document.write('<link rel="stylesheet" type="text/css" href="' + stylesheet + '" />');		
