openWin = function(url,name,width,height,xpos,ypos,chrome,scroll,resizable){
  var x, y, w, h, moveX=0, moveY=0, features="";
  chrome = chrome ? "yes" : "no";
  scroll = scroll ? "yes" : "no";
  resizable = resizable ? "yes" : "no";
  features += "toolbar="+chrome+",location="+chrome+",status="+chrome+",menubar="+chrome;
  features += ",scrollbars="+scroll+",resizable="+resizable;
  if(width) features += ",width="+width;
  if(height) features += ",height="+height;
  if(xpos && window.screen){
    w = window.screen.availWidth;
    width = parseInt(width);
    switch(xpos){
      case "left": x = 0; break;
      case "center": x = (w-width)/2; break;
      case "right": x = w-width; break;
      default: x = xpos;
    }
    features += ",screenX="+x+",left="+x;
    var moveX = x;
  }
  if(ypos && window.screen){
    h = window.screen.availHeight;
    height = parseInt(height);
    switch(ypos){
      case "top": y = 0; break;
      case "middle": y = (h-height)/2; break;
      case "bottom": y = h-height; break;
      default: y = ypos;
    }
    features += ",screenY="+y+",top="+y;
    var moveY = y;
  }
  features +=",left="+moveX+",top="+moveY;
eval("openWinReference = window.open(url, name, features);");  
openWinReference.focus();
}
//
function writeObject(str){
	document.write(str);
}
function postComment(){
//	openWin("/itinerary/eng/common/comment.html","nWin",778,600,"center","middle",false,"scroll");
	openWin("common/comment.html","nWin",778,600,"center","middle",false,"scroll");
}
function postComment2(){
	openWin("../common/comment.html","nWin",778,600,"center","middle",false,"scroll");
}
function howToUse(theme){
	if (theme==5){
		openWin("transit.html","nWin",700,550,"center","middle",false,"");
	}else{
		openWin("howtoUse.html","nWin",700,550,"center","middle",false,"");
	}
}
function howToUse2(theme){
	if (theme==5){
		openWin("../transit.html","nWin",700,550,"center","middle",false,"");
	}else{
		openWin("../howtoUse.html","nWin",700,550,"center","middle",false,"");
	}
}
function chgLang(lang){
	var language = lang;
	if (lang=="eng"){
		language = "eng";
	}
	if (lang=="tc"){
		language = "tc";
	}
	if (lang=="sc"){
		language = "china";
	}
	if (lang=="kr"){
		language = "kor";
	}
	if (lang=="fr"){
		language = "france";
	}
	location.href ='../'+language+'/';
}
//
/****************************************************************************************************/
var isInternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
// Handle all the FSCommand messages in a Flash movie.
function index_DoFSCommand(command, args) {
	var indexObj = isInternetExplorer ? document.all.index : document.index;
	eval(command+"('"+args+"');");
}
// Hook for Internet Explorer.
if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
	document.write('<script language=\"VBScript\"\>\n');
	document.write('On Error Resume Next\n');
	document.write('Sub index_FSCommand(ByVal command, ByVal args)\n');
	document.write('	Call index_DoFSCommand(command, args)\n');
	document.write('End Sub\n');
	document.write('</script\>\n');
}