
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v3.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
  if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function doScreen(uri) {
  self.location.href = uri;
  return false;
}
function jumpScreen(uri) {
  top.location.href = uri;
  return false;
}

var newWin = 0;
function MM_openBrWindow(theURL,winName,features) {
  newWin = window.open(theURL,winName,features);
  newWin.focus();
  return false;
}

/**
mac=(navigator.appVersion.indexOf('Mac')!=-1)?true:false;
ie=(navigator.appName.charAt(0)=="M")?true:false;
//alert(navigator.appName);
vNum = navigator.appVersion.charAt(0);
document.writeln("<style type='text/css'><!--");
if(mac){
	if (ie){ // Macintosh_IE
	    document.writeln("td {font-size:12px; line-height:15px}");
		document.writeln(".sub{font-size:9px; line-height:10px;letter-spacing:0px}");
		document.writeln(".t9{font-size:10px; line-height:12px;letter-spacing:0px}");
		document.writeln(".t10{font-size:11px; line-height:12px;letter-spacing:0px}");
		document.writeln(".t11{font-size:12px; line-height:12px}");
		document.writeln(".t12{font-size:14px; line-height:15px;letter-spacing:0px}");
		document.writeln(".t14{font-size:15px; line-height:18px;letter-spacing:0px}");
		document.writeln(".img{vertical-align:middle}");
	} else {
	    document.writeln("td {font-size:10pt; line-height:15px}");
		if ( vNum <=4 ){ // Macintosh_NN4
			document.writeln(".sub{font-size:8px;}");
			document.writeln(".t9{font-size:10px}");
			document.writeln(".t10{font-size:12px}");
			document.writeln(".t11{font-size:11px}");
			document.writeln(".t12{font-size:12px}");
			document.writeln(".t14{font-size:14px}");
			document.writeln(".img{vertical-align:top}");
			document.writeln(".normal {FONT-SIZE: 12pt}");
			document.writeln("P {FONT-SIZE: 12pt; LINE-HEIGHT: 150%}");
		} else {
			if ( vNum >=5 ){ // Macintosh_NN6,7 / FireFox / Safari
				document.writeln(".sub{font-size:10px; line-height:12px}");
				document.writeln(".t9{font-size:10px; line-height:14px;letter-spacing:1px}");
				document.writeln(".t10{font-size:11px; line-height:15px}");
				document.writeln(".t11{font-size:12px; line-height:15px}");
				document.writeln(".t12{font-size:14px; line-height:18px}");
				document.writeln(".t14{font-size:15px; line-height:24px}");
				document.writeln(".img{vertical-align:middle}");
				document.writeln("UL {margin-left:20px;margin-bottom:5px}");
				document.writeln("LI {margin-bottom:5px}");
			}
		}
	}
} else {
	if (ie){	//for Windows IE
		document.writeln("td {font-size:11pt; line-height:18px}");
		document.writeln(".sub{font-size:10px; line-height:12px;letter-spacing:0px}");
		document.writeln(".t9{font-size:9pt; line-height:14px;letter-spacing:1px}");
		document.writeln(".t10{font-size:10pt; line-height:15px}");
		document.writeln(".t11{font-size:11pt; line-height:15px}");
		document.writeln(".t12{font-size:12pt; line-height:18px}");
		document.writeln(".t14{font-size:14pt; line-height:24px}");
		document.writeln(".img{vertical-align:middle}");
		document.writeln("UL {margin-left:20px;margin-bottom:5px}");
		document.writeln("LI {margin-bottom:5px}");
	} else{
		document.writeln("td {font-size:15px; line-height:18px}");
		if ( vNum <=4 ){ // Windows_NN4
			document.writeln(".sub{font-size:9px; line-height:12px}");
			document.writeln(".t9{font-size:11px; line-height:12px}");
			document.writeln(".t10{font-size:11px; line-height:14px}");
			document.writeln(".t11{font-size:12px; line-height:15px}");
			document.writeln(".t12{font-size:12px; line-height:15px}");
			document.writeln(".t14{font-size:15px; line-height:20px}");
			document.writeln(".img{vertical-align:top}")
		} else{
			if ( vNum >=5 ){ // Windows_NN6,7 / FireFox / Safari
				document.writeln(".sub{font-size:10px; line-height:12px}");
				document.writeln(".t9{font-size:10px; line-height:12px;letter-spacing:1px}");
				document.writeln(".t10{font-size:10pt; line-height:15px}");
				document.writeln(".t11{font-size:11pt; line-height:15px}");
				document.writeln(".t12{font-size:12pt; line-height:18px}");
				document.writeln(".t14{font-size:14pt; line-height:24px}");
				document.writeln(".img{vertical-align:middle}");
				document.writeln("UL {margin-left:20px;margin-bottom:5px}");
				document.writeln("LI {margin-bottom:5px}");
			}
		}
	}
}
document.writeln("--></style>");
**/

function triming(src) {
	if ( src.length > 0 ) {
		strstart = 0;
		for (i = 0; i < src.length; i++) {
			if (src.substring(i,i+1)==' ' || src.substring(i,i+1)==unescape("%u3000"))
				strstart++;
			else
				break;
		}
		//All Space
		if ( strstart == src.length ) {
			return "";
		}
		strend = src.length;
		for (i = strend; i >= 0; i--) {
			if (src.substring(i-1,i)==' ' || src.substring(i-1,i)==unescape("%u3000"))
				strend--;
			else
				break;
		}
		return src.substring(strstart,strend);
	} else {
		return "";
	}
}


function setCookie(theName, theValue) {
	if ( theName != null && theValue != null ) {
		exp=new Date();
		exp.setTime(exp.getTime()+(1000*60*60)*24*90);		//90日
		expday = exp.toGMTString();
		document.cookie = theName + "=" + escape(theValue) + ";expires=" + expday;
		return true;
	}
	return false;
}
function getCookie(theName) {
	if ( document.cookie != null ) {
		theName += "=";
		theCookie = document.cookie + ";";
//alert(theCookie);
		start = theCookie.indexOf(theName);
		if ( start != -1 ) {
			end = theCookie.indexOf(";", start);
//alert("start=["+start + "] end=[" +end+"]");
			return unescape(theCookie.substring(start + theName.length, end));
		}
	}
	return "";
}
//function mdown(e) {
//  if (navigator.appName == "Microsoft Internet Explorer") {
//    if (event.button == 2) {
//      alert("Invalid Right Button");
//      return false;
//    }
//  } else if (navigator.appName == "Netscape") {
//    if (e.which == 3) {
//      alert("Invalid Right Button");
//      return false;
//    }
//  }
//}
//if (document.all) {
//  document.onmousedown = mdown;
//} else {
//  window.onmousedown = mdown;
//  window.captureEvents(Event.MOUSEDOWN);
//}
