//中文
/*
function swapImgRestore() { //v3.0
  var i,x,a=document. sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d. p) d. p=new Array();
    var i,j=d. p.length,a= preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf('#')!=0){ d.p[j]=new Image; d. p[j++].src=a[i];}}
}

function findObj(n, d) { //v4.01
  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= findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function swapImage() { //v3.0
  var i,j=0,x,a= swapImage.arguments; document. sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x= findObj(a[i]))!=null){document. sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}*/

var snArr=new Array();
var colArr=new Array();

var holdSn=1;
var color='';

var holdSn2=1;
var color2='';


function chShow(item_id){
	//alert(item_id);
	var item_style= document.getElementById(item_id).style;
	if(item_style===undefined){
		item_style= window.frames[0].document.getElementById(item_id).style;
	}
	if(item_style.display=="block"){
		item_style.display="none";
		return false;
	}else{
		item_style.display="block";
		return true;
	}
}
/*
function chTab(sn,cor){

	if(holdSn==sn){
		return;
	}
	colorStr='#e7e7e7';
	if(color=='o')
		colorStr='#ffb400';
	else if(color=='r')
		colorStr='#ff0000';
	else if(color=='b')
		colorStr='#00b5ff';
	d=document;
	d.getElementById('tab'+sn+1).src='/img/sys/tab-01-a.jpg';
	d.getElementById('tab'+sn+3).src='/img/sys/tab-03-a.jpg';
	d.getElementById('tab'+sn+6).src='/img/sys/tab-06-a.jpg';
	d.getElementById('tab'+sn+8).src='/img/sys/tab-08-a.jpg';
	d.getElementById('tab'+sn+2).style.backgroundImage='url('+'/img/sys/tab-02-a.jpg'+')';
	d.getElementById('tab'+sn+4).style.backgroundImage='url('+'/img/sys/tab-04-a.jpg'+')';
	d.getElementById('tab'+sn+5).style.backgroundImage='url('+'/img/sys/tab-05-a.jpg'+')';
	d.getElementById('tab'+sn+7).style.backgroundImage='url('+'/img/sys/tab-07-a.jpg'+')';

	d.getElementById('tab'+sn).style.background='#ffffff';
	d.getElementById('tab'+sn).style.fontWeight='bold';
	d.getElementById('tab'+sn).style.color='#FF6600';

	d.getElementById('tab'+holdSn+1).src='/img/sys/tab-'+color+'01.jpg';
	d.getElementById('tab'+holdSn+3).src='/img/sys/tab-'+color+'03.jpg';
	d.getElementById('tab'+holdSn+6).src='/img/sys/tab-'+color+'06.jpg';
	d.getElementById('tab'+holdSn+8).src='/img/sys/tab-'+color+'08.jpg';
	d.getElementById('tab'+holdSn+2).style.backgroundImage='url('+'/img/sys/tab-'+color+'02.jpg'+')';
	d.getElementById('tab'+holdSn+4).style.backgroundImage='url('+'/img/sys/tab-'+color+'04.jpg'+')';
	d.getElementById('tab'+holdSn+5).style.backgroundImage='url('+'/img/sys/tab-'+color+'05.jpg'+')';
	d.getElementById('tab'+holdSn+7).style.backgroundImage='url('+'/img/sys/tab-'+color+'07.jpg'+')';

	d.getElementById('tab'+holdSn).style.background=colorStr;
	d.getElementById('tab'+holdSn).style.fontWeight='normal';
	d.getElementById('tab'+holdSn).style.color='#000000';

	holdSn=sn;
	color=cor;
}


function chTab2(sn,cor){

	if(holdSn2==sn){
		return;
	}
	colorStr='#e7e7e7';
	if(color2=='o')
		colorStr='#ffb400';
	else if(color2=='r')
		colorStr='#ff0000';
	else if(color2=='b')
		colorStr='#00b5ff';
	d=document;
	d.getElementById('tb'+sn+1).src='/img/sys/tab-01-a.jpg';
	d.getElementById('tb'+sn+3).src='/img/sys/tab-03-a.jpg';
	d.getElementById('tb'+sn+6).src='/img/sys/tab-06-a.jpg';
	d.getElementById('tb'+sn+8).src='/img/sys/tab-08-a.jpg';
	d.getElementById('tb'+sn+2).style.backgroundImage='url('+'/img/sys/tab-02-a.jpg'+')';
	d.getElementById('tb'+sn+4).style.backgroundImage='url('+'/img/sys/tab-04-a.jpg'+')';
	d.getElementById('tb'+sn+5).style.backgroundImage='url('+'/img/sys/tab-05-a.jpg'+')';
	d.getElementById('tb'+sn+7).style.backgroundImage='url('+'/img/sys/tab-07-a.jpg'+')';

	d.getElementById('tb'+sn).style.background='#ffffff';
	d.getElementById('tb'+sn).style.fontWeight='bold';
	d.getElementById('tb'+sn).style.color='#FF6600';

	d.getElementById('tb'+holdSn2+1).src='/img/sys/tab-'+color2+'01.jpg';
	d.getElementById('tb'+holdSn2+3).src='/img/sys/tab-'+color2+'03.jpg';
	d.getElementById('tb'+holdSn2+6).src='/img/sys/tab-'+color2+'06.jpg';
	d.getElementById('tb'+holdSn2+8).src='/img/sys/tab-'+color2+'08.jpg';
	d.getElementById('tb'+holdSn2+2).style.backgroundImage='url('+'/img/sys/tab-'+color2+'02.jpg'+')';
	d.getElementById('tb'+holdSn2+4).style.backgroundImage='url('+'/img/sys/tab-'+color2+'04.jpg'+')';
	d.getElementById('tb'+holdSn2+5).style.backgroundImage='url('+'/img/sys/tab-'+color2+'05.jpg'+')';
	d.getElementById('tb'+holdSn2+7).style.backgroundImage='url('+'/img/sys/tab-'+color2+'07.jpg'+')';

	d.getElementById('tb'+holdSn2).style.background=colorStr;
	d.getElementById('tb'+holdSn2).style.fontWeight='normal';
	d.getElementById('tb'+holdSn2).style.color='#000000';

	holdSn2=sn;
	color2=cor;
}
*/


function chTabArr(arr,sn,cor){
	//alert("arr="+arr+";sn="+sn+";cor="+cor);

	if(snArr[arr]==sn){
		return;
	}
	colorStr='#e7e7e7';
	if(colArr[arr]=='o')
		colorStr='#ffb400';
	else if(colArr[arr]=='r')
		colorStr='#ff0000';
	else if(colArr[arr]=='b')
		colorStr='#00b5ff';
	d=document;
	d.getElementById('tab'+arr+'_'+sn+1).src='/img/sys/tab-01-a.jpg';
	d.getElementById('tab'+arr+'_'+sn+3).src='/img/sys/tab-03-a.jpg';
	d.getElementById('tab'+arr+'_'+sn+6).src='/img/sys/tab-06-a.jpg';
	d.getElementById('tab'+arr+'_'+sn+8).src='/img/sys/tab-08-a.jpg';
	d.getElementById('tab'+arr+'_'+sn+2).style.backgroundImage='url('+'/img/sys/tab-02-a.jpg'+')';
	d.getElementById('tab'+arr+'_'+sn+4).style.backgroundImage='url('+'/img/sys/tab-04-a.jpg'+')';
	d.getElementById('tab'+arr+'_'+sn+5).style.backgroundImage='url('+'/img/sys/tab-05-a.jpg'+')';
	d.getElementById('tab'+arr+'_'+sn+7).style.backgroundImage='url('+'/img/sys/tab-07-a.jpg'+')';

	d.getElementById('tab'+arr+'_'+sn).style.background='#ffffff';
	d.getElementById('tab'+arr+'_'+sn).style.fontWeight='bold';
	d.getElementById('tab'+arr+'_'+sn).style.color='#FF6600';

	d.getElementById('tab'+arr+'_'+snArr[arr]+1).src='/img/sys/tab-'+colArr[arr]+'01.jpg';
	d.getElementById('tab'+arr+'_'+snArr[arr]+3).src='/img/sys/tab-'+colArr[arr]+'03.jpg';
	d.getElementById('tab'+arr+'_'+snArr[arr]+6).src='/img/sys/tab-'+colArr[arr]+'06.jpg';
	d.getElementById('tab'+arr+'_'+snArr[arr]+8).src='/img/sys/tab-'+colArr[arr]+'08.jpg';
	d.getElementById('tab'+arr+'_'+snArr[arr]+2).style.backgroundImage='url('+'/img/sys/tab-'+colArr[arr]+'02.jpg'+')';
	d.getElementById('tab'+arr+'_'+snArr[arr]+4).style.backgroundImage='url('+'/img/sys/tab-'+colArr[arr]+'04.jpg'+')';
	d.getElementById('tab'+arr+'_'+snArr[arr]+5).style.backgroundImage='url('+'/img/sys/tab-'+colArr[arr]+'05.jpg'+')';
	d.getElementById('tab'+arr+'_'+snArr[arr]+7).style.backgroundImage='url('+'/img/sys/tab-'+colArr[arr]+'07.jpg'+')';

	d.getElementById('tab'+arr+'_'+snArr[arr]).style.background=colorStr;
	d.getElementById('tab'+arr+'_'+snArr[arr]).style.fontWeight='normal';
	d.getElementById('tab'+arr+'_'+snArr[arr]).style.color='#000000';

	snArr[arr]=sn;
	colArr[arr]=cor;
}










//=======================================================xOpen Start

var top=50;  //我是Top設定喔！
var left=330; //我是Left設定喔！

if(!x_open_path)
	var x_open_path = '/icon/xOpen/';

var symbol_img   = x_open_path + "symbol.gif";
var max_img      = x_open_path + "max.gif";
var restore_img  = x_open_path + "min.gif";
var close_img    = x_open_path + "close.gif";
var help_img     = x_open_path + "help.gif";
var title_img    = x_open_path + "title.gif";
var bottom_img   = x_open_path + "bottom.gif";
var intern_img   = x_open_path + "intern.gif";
var grip_img     = x_open_path + "grip.gif";
var forward_img  = x_open_path + "forward.gif";
var back_img     = x_open_path + "back.gif";
var border_img   = x_open_path + "border.gif";
var blankImg   = x_open_path + "blank.jpg";

//var loading_page =  "/lib/htm/blank.htm";
var wid=350;
var hei=220;

// obj
var x_open_win_id;
var x_open_content_id    ;
var title_msg_layer_id   ;
var x_open_frame_id ;
var max_button_name_id ;
var border_img_name1_id ;
var border_img_name2_id ;
var x_open_win_border_id ;
var size_info_layer_id ;

var initialwidth, initialheight;
var dragapproved ;
var dragresized ;
var minrestore   ;
var x_open_ie5 ;
var x_open_ns6 ;
var title_height;
/*

*/

function init(w,h,loading_page){
  win_frame = "<div id='x_open_win' style='position:absolute;z-index:100;width: "+w+"px; height: "+ h+"px ; left:10px;top:10px;font-size:12px; display:none ' onselectstart='return false'>\r\n";//
  win_frame += "<div>\r\n";
  win_frame += "<table width='100%'  border='0' cellspacing='0' cellpadding='0'>\r\n";
  win_frame += "	<tr>\r\n";
  win_frame += "		<td width='19'><img src='" + symbol_img + "' width='19' height='21' border='0'  title='Reload Page' onclick='xopen_reload();' /></td>\r\n";
  win_frame += "		<td width='5' style='background: url(" + title_img + "); padding:0px'></td><td style='background: url(" + title_img + "); padding:0px' onmousedown='initialize_drag(event)' ondblclick='maximize()'><font color='#333333'><div id='title_msg_layer'><strong>title</strong></div></font>\r\n";
  win_frame += "		</td>\r\n";
  win_frame += "		<td style='background: url(" + title_img + "); padding:0px' onmousedown='initialize_drag(event)' ondblclick='maximize()'></td>\r\n";
  win_frame += "	<td width='44' style='cursor:default; ' align='center'>";
  win_frame += "<img src='" + help_img + "' width='12' height='21' border='0' onclick='xopen_about()' title='Help' />";
  win_frame += "<img src='" + max_img + "' id='max_button_name' onclick='maximize()' width='16' height='21' border='0' title='maximize' />";
  win_frame += "<img src='" + close_img + "' onclick='closeit()' width='16' height='21' border='0' title='Close xWindow' />";
  win_frame += "</td>\r\n";
  win_frame += "	</tr>\r\n";
  win_frame += "</table>\r\n";
  win_frame += "</div>\r\n";
  //win_frame += "<div id='x_open_content' align=center style='width:100%;  margin: 0px;background-color: #ffffff;	MOZ-OPACITY:0.50;FILTER :  Alpha(Opacity=100);'>\r\n";
  win_frame += "<div id='x_open_content' align=center style='width:100%;  margin: 0px;background-color: #ffffff;'>\r\n";//	filter: Alpha(Opacity=60);
  win_frame += "<table style='width:100%;  margin: 0px;' border='0' cellpadding='0' cellspacing='0'>\r\n";//height:100%;
  win_frame += "	<tr>\r\n";
  win_frame += "		<td width='1'><img src='" + border_img + "' id='border_img_name1' border='0' style='border:0px; width:1px; height:177px; margin: 0px;' /></td>\r\n";
  win_frame += "		<td width=100% weight=100%>\r\n";
  win_frame += "		<iframe id='x_open_frame' name='x_open_frame' src='" + loading_page + "' frameborder=0 noresize scrolling=auto style='width:100%; height:100%;background-color: #ffffff;color: #333;margin: 0px; padding: 0px;border:0px '></iframe>\r\n";
  win_frame += "		</td>\r\n";
  win_frame += "		<td width='1'><img src='" + border_img + "' id='border_img_name2' border='0' style='border:0px; width:1px; height:177px; margin: 0px;' /></td>\r\n";
  win_frame += "	</tr>\r\n";
  win_frame += "</table>\r\n";
  win_frame += "</div>\r\n";
  win_frame += "<div align='center' style='width:100%;height:15px;background: url(" + bottom_img + ");' onselectstart='return false'>\r\n";
  win_frame += "<table width='100%'  border='0' cellspacing='0' cellpadding='0'>\r\n";
  win_frame += "	<tr>\r\n";
  win_frame += "		<td width='19'><img src='" + intern_img + "' width='28' height='15' border='0' /></td>\r\n";
  //win_frame += "			<td width='42'><img src='" + back_img + "' width='19' height='13' border='0' title='back' onclick='xopen_back();'/><img src='" + forward_img + "' width='19' height='13' border='0'  title='Forward Page' onclick='xopen_forward();'/></td>\r\n";
  win_frame += "		<td colspan=2><div id='size_info_layer'>&nbsp;</div></td>\r\n";
  win_frame += "		<td>&nbsp;</td>\r\n";
  //win_frame += "		<td width='19'><img src='" + grip_img + "' width='19' height='15' border='0' style='cursor:nw-resize' title='Resize' onmousedown='return initialize_resize(event)' /></td>\r\n";
  win_frame += "		<td width='19'><img src='" + grip_img + "' width='19' height='15' border='0' /></td>\r\n";
  win_frame += "	</tr>\r\n";
  win_frame += "</table>\r\n";
  win_frame += "</div>\r\n";
  win_frame += "</div>\r\n";
  win_frame += "<div id='x_open_win_border' style='position:absolute;z-index:100;width:0px;height:0px;display:none'></div>\r\n";
  //window.document.write(win_frame);
  //document.body.insertAdjacentHTML("BeforeEnd",win_frame);
	var w = x_open_ns6 ? window.innerWidth  + 1  : iecompattest().clientWidth  - 10;
	var h = x_open_ns6 ? window.innerHeight + 1 : iecompattest().clientHeight - 10;
  insertHtml("BeforeEnd",document.body,"<div id=hideBack style='display:block;position:absolute;top:0px;left:0px;width:"+w+"px;height:"+h+"px;background:url("+blankImg+");z-index:2' onfocus='window.frames[\"x_open_frame\"].document.forms[\"loginForm\"].pswd.focus()'></div>");
  var obj=document.getElementById("hideBack");
   if (obj.filters){//IE
    //if (obj.filters.alpha.opacity<80){
    //  obj.filters.alpha.opacity=100;
    //}else{
      obj.style.filter="alpha(opacity=10)";
    //}
  }else{
    //if (obj.style.MozOpacity<0.7){
    //  obj.style.MozOpacity=1;
    //}else{
      obj.style.MozOpacity=0.1;
    //}
  }
  insertHtml("BeforeEnd",document.body,win_frame);
  x_open_win_id	= document.getElementById("x_open_win");
  x_open_content_id    = document.getElementById("x_open_content");
  title_msg_layer_id   = document.getElementById("title_msg_layer");
  x_open_frame_id      = document.getElementById("x_open_frame");
  max_button_name_id   = document.getElementById("max_button_name");
  border_img_name1_id  = document.getElementById("border_img_name1");
  border_img_name2_id  = document.getElementById("border_img_name2");
  x_open_win_border_id = document.getElementById("x_open_win_border");
  size_info_layer_id   =  document.getElementById("size_info_layer");

  dragapproved = false;
  dragresized  = false;
  minrestore   = 0;
  x_open_ie5   = document.all && document.getElementById;
  x_open_ns6   = document.getElementById && !document.all;
  title_height = 36;
}

function insertHtml(where, el, html){
	where = where.toLowerCase();
	if(el.insertAdjacentHTML){
	  switch(where){
		case "beforebegin":
		  el.insertAdjacentHTML('BeforeBegin', html);
		  return el.previousSibling;
		case "afterbegin":
		  el.insertAdjacentHTML('AfterBegin', html);
		  return el.firstChild;
		case "beforeend":
		  el.insertAdjacentHTML('BeforeEnd', html);
		  return el.lastChild;
		case "afterend":
		  el.insertAdjacentHTML('AfterEnd', html);
		  return el.nextSibling;
	  }
	  throw 'Illegal insertion point -> "' + where + '"';
	}
  var range = el.ownerDocument.createRange();
	var frag;
	switch(where){
	  case "beforebegin":
		range.setStartBefore(el);
		frag = range.createContextualFragment(html);
		el.parentNode.insertBefore(frag, el);
		return el.previousSibling;
	     case "afterbegin":
		if(el.firstChild){
		    range.setStartBefore(el.firstChild);
		    frag = range.createContextualFragment(html);
		    el.insertBefore(frag, el.firstChild);
		    return el.firstChild;
		}else{
		    el.innerHTML = html;
		    return el.firstChild;
		}
	    case "beforeend":
		if(el.lastChild){
		    range.setStartAfter(el.lastChild);
		    frag = range.createContextualFragment(html);
		    el.appendChild(frag);
		    return el.lastChild;
		}else{
		    el.innerHTML = html;
		    return el.lastChild;
		}
	    case "afterend":
		range.setStartAfter(el);
		frag = range.createContextualFragment(html);
		el.parentNode.insertBefore(frag, el.nextSibling);
		return el.nextSibling;
	}
	throw 'Illegal insertion point -> "' + where + '"';
}
function xOpen(){//url,title
  x_open("Please Login",'/bin/user/login.php', 280, 220);
}
function x_open(title, aurl, width, height){
  if(width<20||height<20){
    width=550;
    height=400;
  }
  if(!x_open_win_id){
    init(width,height,aurl);
  }
  if(!aurl){
    aurl="&nbsp;";
  }
  //return;
	if (!x_open_ie5 && !x_open_ns6){
		window.open(aurl, "/lib/htm/blank.htm", "width="+width+",height="+height+",scrollbars=1");
    //alert("ERROR");
	}else{
    //alert("HMM...");
    document.getElementById("hideBack").style.display = "block";
		x_open_win_id.style.display  = 'block';
		//x_open_win_id.style.visible  = false;
    //alert("HMM...11");
		initialwidth		 = width;
		initialheight		= height;
		change_size(initialwidth, initialheight);
    //alert("HMM...2");
		x_open_win_id.style.left     = left + "px";
		x_open_win_id.style.top      = x_open_ns6 ? window.pageYOffset * 1 + top + "px" : iecompattest().scrollTop* 1 + top + "px";
    //alert("HMM...3");
		x_open_frame_id.src= aurl;
		title_msg_layer_id.innerHTML = '<font color=#333333>' + title + '</font>';
	}
  //change_size(wid,hei);
  //alert("PASS");
}

function iecompattest(){
	return (!window.opera && document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function xopen_about(){
	alert("Welcome");
}
function xopen_back(){
	x_open_frame.history.back();
}
function xopen_forward(){
	x_open_frame.history.go(1);
}
function xopen_reload(){
	x_open_frame.location.reload();
}
function closeit(){
	//x_open_frame_id.src = loading_page;
  x_open_win_id.style.display = "none";
  document.getElementById("hideBack").style.display = "none";
	return true;
}

function maximize(){
	if (minrestore == 0){
		minrestore = 1; //maximize window
		max_button_name_id.setAttribute("src", restore_img);
		max_button_name_id.setAttribute("title", 'restore');
		var w = x_open_ns6 ? window.innerWidth  - 40  : iecompattest().clientWidth  - 20;
		var h = x_open_ns6 ? window.innerHeight - 40 : iecompattest().clientHeight - 20;
    //alert(window.innerWidth+"=="+window.innerHeight);
		change_size(w, h);
	}
	else{
		minrestore=0; //restore window
		max_button_name_id.setAttribute("src", max_img);
		max_button_name_id.setAttribute("title", 'maximize xWindow');
		change_size(initialwidth, initialheight);
	}
	x_open_win_id.style.left = x_open_ns6 ? window.pageXOffset + 10 + "px" : iecompattest().scrollLeft + 10 + "px";
	x_open_win_id.style.top  = x_open_ns6 ? window.pageYOffset + 10 + "px" : iecompattest().scrollTop  + 10 + "px";
}

function change_size(w, h){
  if(w > 150 )
    x_open_win_id.style.width = w+"px";
  else
    x_open_win_id.style.width = "150px";
  //alert('COW8');
  if(h > 40 ){
    x_open_win_id.style.height = h+"px";
    border_img_name1_id.style.height = h+"px";
    border_img_name2_id.style.height = h+"px";
    x_open_frame_id.style.height = h+"px";
  }else{
    x_open_win_id.style.height = "40px";
    border_img_name1_id.style.height = "40px";
    border_img_name2_id.style.height = "40px";
    x_open_frame_id.style.height = "40px";
  }
  //alert(x_open_win_id.style.width+"=="+x_open_win_id.style.height);
  //我是視窗下方的size說明喔！
  //size_info_layer_id.innerHTML = '<font style="font-size:11px;font-family:Courier New">size:' + remove_units(x_open_win_id.style.width) + 'x' + remove_units(x_open_win_id.style.height) + '</font>';
}

function remove_units(elem){
	return(parseInt(elem.replace(/px/g,"")));
}
//<<<drag move

function initialize_drag(e){
	var evt = x_open_ns6 ? e : event;
	offsetx = evt.clientX;
	offsety = evt.clientY;
	tempx   = parseInt(x_open_win_id.style.left);
	tempy   = parseInt(x_open_win_id.style.top);

	dragapproved = true;
	//x_open_frame.style.display = 'none';
	//x_open_frame_id.style.display = 'none';
	document.body.style.cursor    = 'move';
	document.onmousemove	  = drag_drop;
	document.onmouseup       = drag_drop_stop;
	//x_open_win_id.onmouseup       = drag_drop_stop;
}

function drag_drop(e){
  if(dragapproved){
		var evt = x_open_ns6 ? e : event;
		x_open_win_id.style.left = tempx + evt.clientX - offsetx + "px";
		x_open_win_id.style.top  = tempy + evt.clientY - offsety + "px";
	}
	return false;
}
function drag_drop_stop(e){
	dragapproved = false;
	//x_open_content_id.style.display = '';
	x_open_frame_id.style.display = '';
	document.body.style.cursor    = 'default';
	document.onmousemove	  = null;
}

//>>>drag move

//resize===<<<
/*
function initialize_resize(e){
	evt = x_open_ns6 ? e : event;
	x_open_win_border_id.style.left    = x_open_win_id.style.left;
	x_open_win_border_id.style.top     = x_open_win_id.style.top;
	x_open_win_border_id.style.width   = x_open_win_id.style.width;
	x_open_win_border_id.style.height  = x_open_win_id.style.height;

	click_x			    = evt.clientX;
	click_y			    = evt.clientY;
	evt_width			  = click_x - remove_units(x_open_win_id.style.left);
	evt_height			 = click_y - remove_units(x_open_win_id.style.top);
	dragresized			= true;
	x_open_win_border_id.style.display = '';
	x_open_win_border_id.style.border  ='1px #808080 solid';

	document.body.style.cursor	 = 'nw-resize';
	document.onmousemove	       = drag_resize;
	document.onmouseup		 = drag_resize_stop;
	return false;
}
function drag_resize(e){
	if(dragresized){
		var evt = x_open_ns6 ? e : event;
		var w = evt_width + (evt.clientX - click_x);
		var h = evt_height + (evt.clientY - click_y);
		if(w > 0 )
			x_open_win_border_id.style.width = w +"px";
		if(h > 0 )
			x_open_win_border_id.style.height = h+"px";
	}
  //size_info_layer_id.innerHTML =w+","+h;
	document.body.style.cursor = 'nw-resize';
	return false;
}
function drag_resize_stop(e){
	dragresized=false;
	change_size(remove_units(x_open_win_border_id.style.width), remove_units(x_open_win_border_id.style.height));
  //alert(remove_units(x_open_win_border_id.style.width)+"==="+remove_units(x_open_win_border_id.style.height));
	x_open_win_border_id.style.border  = '0px';
	x_open_win_border_id.style.display = 'none';
	document.body.style.cursor	 = 'default';
	document.onmousemove	       = null;
}
*/
//====================================================xOpen End


function addAjax(act,divId){
	var xmlHttp;
  if(!act||!divId){
    return;
  }
  if(!(xmlHttp=newXml())){
   return;
  }
  xmlHttp.open("GET",act,true);
  xmlHttp.onreadystatechange=function(){
	  if(xmlHttp.readyState!=4)
	    return;
	  try{
	  	if(!document.getElementById(divId)){
	  		//alert('aaa'+window.frames[0].document.getElementById(divId));//.innerHTML
	  		if(divId.substring(0,1)=='_')
	  			window.frames[0].document.getElementById(divId).innerHTML+=xmlHttp.responseText;
	  		else
	  		window.frames[0].document.getElementById(divId).innerHTML=xmlHttp.responseText;
	  	}else{
	  		if(divId.substring(0,1)=='_')
	    		document.getElementById(divId).innerHTML+=xmlHttp.responseText;
	    	else
	    		document.getElementById(divId).innerHTML=xmlHttp.responseText;
	  		//alert('bbb'+document.getElementById(divId).innerHTML);
	    }
	  }catch(e){}
	}
  xmlHttp.send(null);
}

function newXml(){
	var xml;
  try{
    xml=new XMLHttpRequest();
  }catch(e){
    try{
      xml = new ActiveXObject("Msxml2.XMLHTTP");
    }catch(ee){
      try{
        xml = new ActiveXObject("Microsoft.XMLHTTP");
      }catch(eee){
        alert("SCRIPT ERROR");
        return false;
      }
    }
  }
	return xml;
}

