if(typeof uz=="undefined"){var uz={};}uz.namespace=function(){var a=arguments,o=null,i,j,d;for(i=0;i<a.length;++i){d=a[i].split(".");o=uz;for(j=(d[0]=="uz")?1:0;j<d.length;++j){o[d[j]]=o[d[j]]||{};o=o[d[j]];}}return o;};uz.log=function(_2,_3,_4){var l=uz.widget.Logger;if(l&&l.log){return l.log(_2,_3,_4);}else{return false;}};uz.extend=function(_6,_7,_8){var F=function(){};F.prototype=_7.prototype;_6.prototype=new F();_6.prototype.constructor=_6;_6.superclass=_7.prototype;if(_7.prototype.constructor==Object.prototype.constructor){_7.prototype.constructor=_7;}if(_8){for(var i in _8){_6.prototype[i]=_8[i];}}};uz.augment=function(r,s){var rp=r.prototype,sp=s.prototype,a=arguments,i,p;if(a[2]){for(i=2;i<a.length;++i){rp[a[i]]=sp[a[i]];}}else{for(p in sp){if(!rp[p]){rp[p]=sp[p];}}}};uz.namespace("util","widget","example");
uz.util.Connect={_msxml_progid:['MSXML2.XMLHTTP.3.0','MSXML2.XMLHTTP','Microsoft.XMLHTTP'],_http_header:{},_has_http_headers:false,_use_default_post_header:true,_default_post_header:'application/x-www-form-urlencoded',_isFormSubmit:false,_isFileUpload:false,_formNode:null,_sFormData:null,_poll:{},_timeOut:{},_polling_interval:50,_transaction_id:0,setProgId:function(id)
{this._msxml_progid.unshift(id);},setDefaultPostHeader:function(b)
{this._use_default_post_header=b;},setPollingInterval:function(i)
{if(typeof i=='number'&&isFinite(i)){this._polling_interval=i;}},createXhrObject:function(transactionId)
{var obj,http;try
{http=new XMLHttpRequest();http.overrideMimeType('text/xml');obj={conn:http,tId:transactionId};}
catch(e)
{for(var i=0;i<this._msxml_progid.length;++i){try
{http=new ActiveXObject(this._msxml_progid[i]);obj={conn:http,tId:transactionId};break;}
catch(e){}}}
finally
{return obj;}},getConnectionObject:function()
{var o;var tId=this._transaction_id;try
{o=this.createXhrObject(tId);if(o){this._transaction_id++;}}
catch(e){}
finally
{return o;}},asyncRequest:function(method,uri,callback,postData)
{var o=this.getConnectionObject();if(!o){return null;}
else{if(this._isFormSubmit){if(this._isFileUpload){this.uploadFile(o.tId,callback,uri,postData);this.releaseObject(o);return;}
if(method=='GET'){if(this._sFormData.length!=0){uri+=((uri.indexOf('?')==-1)?'?':'&')+this._sFormData;}
else{uri+="?"+this._sFormData;}}
else if(method=='POST'){postData=postData?this._sFormData+"&"+postData:this._sFormData;}}
o.conn.open(method,uri,true);if(this._isFormSubmit||(postData&&this._use_default_post_header)){this.initHeader('Content-Type',this._default_post_header);if(this._isFormSubmit){this.resetFormState();}}
if(this._has_http_headers){this.setHeader(o);}
this.handleReadyState(o,callback);o.conn.send(postData||null);return o;}},handleReadyState:function(o,callback)
{var oConn=this;if(callback&&callback.timeout){this._timeOut[o.tId]=window.setTimeout(function(){oConn.abort(o,callback,true);},callback.timeout);}
this._poll[o.tId]=window.setInterval(function(){if(o.conn&&o.conn.readyState==4){window.clearInterval(oConn._poll[o.tId]);delete oConn._poll[o.tId];if(callback&&callback.timeout){delete oConn._timeOut[o.tId];}
oConn.handleTransactionResponse(o,callback);}},this._polling_interval);},handleTransactionResponse:function(o,callback,isAbort)
{if(!callback){this.releaseObject(o);return;}
var httpStatus,responseObject;try
{if(o.conn.status!==undefined&&o.conn.status!=0){httpStatus=o.conn.status;}
else{httpStatus=13030;}}
catch(e){httpStatus=13030;}
if(httpStatus>=200&&httpStatus<300){try
{responseObject=this.createResponseObject(o,callback.argument);if(callback.success){if(!callback.scope){callback.success(responseObject);}
else{callback.success.apply(callback.scope,[responseObject]);}}}
catch(e){}}
else{try
{switch(httpStatus){case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:responseObject=this.createExceptionObject(o.tId,callback.argument,(isAbort?isAbort:false));if(callback.failure){if(!callback.scope){callback.failure(responseObject);}
else{callback.failure.apply(callback.scope,[responseObject]);}}
break;default:responseObject=this.createResponseObject(o,callback.argument);if(callback.failure){if(!callback.scope){callback.failure(responseObject);}
else{callback.failure.apply(callback.scope,[responseObject]);}}}}
catch(e){}}
this.releaseObject(o);responseObject=null;},createResponseObject:function(o,callbackArg)
{var obj={};var headerObj={};try
{var headerStr=o.conn.getAllResponseHeaders();var header=headerStr.split('\n');for(var i=0;i<header.length;i++){var delimitPos=header[i].indexOf(':');if(delimitPos!=-1){headerObj[header[i].substring(0,delimitPos)]=header[i].substring(delimitPos+2);}}}
catch(e){}
obj.tId=o.tId;obj.status=o.conn.status;obj.statusText=o.conn.statusText;obj.getResponseHeader=headerObj;obj.getAllResponseHeaders=headerStr;obj.responseText=o.conn.responseText;obj.responseXML=o.conn.responseXML;if(typeof callbackArg!==undefined){obj.argument=callbackArg;}
return obj;},createExceptionObject:function(tId,callbackArg,isAbort)
{var COMM_CODE=0;var COMM_ERROR='communication failure';var ABORT_CODE=-1;var ABORT_ERROR='transaction aborted';var obj={};obj.tId=tId;if(isAbort){obj.status=ABORT_CODE;obj.statusText=ABORT_ERROR;}
else{obj.status=COMM_CODE;obj.statusText=COMM_ERROR;}
if(callbackArg){obj.argument=callbackArg;}
return obj;},initHeader:function(label,value)
{if(this._http_header[label]===undefined){this._http_header[label]=value;}
else{this._http_header[label]=value+","+this._http_header[label];}
this._has_http_headers=true;},setHeader:function(o)
{for(var prop in this._http_header){if(this._http_header.hasOwnProperty(prop)){o.conn.setRequestHeader(prop,this._http_header[prop]);}}
delete this._http_header;this._http_header={};this._has_http_headers=false;},setForm:function(formId,isUpload,secureUri)
{this.resetFormState();var oForm;if(typeof formId=='string'){oForm=(document.getElementById(formId)||document.forms[formId]);}
else if(typeof formId=='object'){oForm=formId;}
else{return;}
if(isUpload){this.createFrame(secureUri?secureUri:null);this._isFormSubmit=true;this._isFileUpload=true;this._formNode=oForm;return;}
var oElement,oName,oValue,oDisabled;var hasSubmit=false;for(var i=0;i<oForm.elements.length;i++){oElement=oForm.elements[i];oDisabled=oForm.elements[i].disabled;oName=oForm.elements[i].name;oValue=oForm.elements[i].value;if(!oDisabled&&oName)
{switch(oElement.type)
{case'select-one':case'select-multiple':for(var j=0;j<oElement.options.length;j++){if(oElement.options[j].selected){if(window.ActiveXObject){this._sFormData+=encodeURIComponent(oName)+'='+encodeURIComponent(oElement.options[j].attributes['value'].specified?oElement.options[j].value:oElement.options[j].text)+'&';}
else{this._sFormData+=encodeURIComponent(oName)+'='+encodeURIComponent(oElement.options[j].hasAttribute('value')?oElement.options[j].value:oElement.options[j].text)+'&';}}}
break;case'radio':case'checkbox':if(oElement.checked){this._sFormData+=encodeURIComponent(oName)+'='+encodeURIComponent(oValue)+'&';}
break;case'file':case undefined:case'reset':case'button':break;case'submit':if(hasSubmit==false){this._sFormData+=encodeURIComponent(oName)+'='+encodeURIComponent(oValue)+'&';hasSubmit=true;}
break;default:this._sFormData+=encodeURIComponent(oName)+'='+encodeURIComponent(oValue)+'&';break;}}}
this._isFormSubmit=true;this._sFormData=this._sFormData.substr(0,this._sFormData.length-1);return this._sFormData;},resetFormState:function(){this._isFormSubmit=false;this._isFileUpload=false;this._formNode=null;this._sFormData="";},createFrame:function(secureUri){var frameId='yuiIO'+this._transaction_id; if(window.ActiveXObject){var io=document.createElement('<iframe id="'+frameId+'" name="'+frameId+'" />');if(typeof secureUri=='boolean'){io.src='javascript:false';}
else if(typeof secureURI=='string'){io.src=secureUri;}}
else{var io=document.createElement('iframe');io.id=frameId;io.name=frameId;}
io.style.position='absolute';io.style.top='-1000px';io.style.left='-1000px';document.body.appendChild(io);},appendPostData:function(postData)
{var formElements=new Array();var postMessage=postData.split('&');for(var i=0;i<postMessage.length;i++){var delimitPos=postMessage[i].indexOf('=');if(delimitPos!=-1){formElements[i]=document.createElement('input');formElements[i].type='hidden';formElements[i].name=postMessage[i].substring(0,delimitPos);formElements[i].value=postMessage[i].substring(delimitPos+1);this._formNode.appendChild(formElements[i]);}}
return formElements;},uploadFile:function(id,callback,uri,postData){var frameId='yuiIO'+id;var io=document.getElementById(frameId);this._formNode.action=uri;this._formNode.method='POST';this._formNode.target=frameId;if(this._formNode.encoding){this._formNode.encoding='multipart/form-data'; }
else{this._formNode.enctype='multipart/form-data';}
if(postData){var oElements=this.appendPostData(postData);}
this._formNode.submit();if(oElements&&oElements.length>0){try
{for(var i=0;i<oElements.length;i++){this._formNode.removeChild(oElements[i]);}}
catch(e){}}
this.resetFormState();var uploadCallback=function()
{var obj={};obj.tId=id;obj.argument=callback.argument;try
{obj.responseText=io.contentWindow.document.body?io.contentWindow.document.body.innerHTML:null;obj.responseXML=io.contentWindow.document.XMLDocument?io.contentWindow.document.XMLDocument:io.contentWindow.document;}
catch(e){}
if(callback.upload){if(!callback.scope){callback.upload(obj);}
else{callback.upload.apply(callback.scope,[obj]);}}
if(uz.util.Event){uz.util.Event.removeListener(io,"load",uploadCallback);}
else if(window.detachEvent){io.detachEvent('onload',uploadCallback);}
else{io.removeEventListener('load',uploadCallback,false);}
setTimeout(function(){document.body.removeChild(io);},100);};if(uz.util.Event){uz.util.Event.addListener(io,"load",uploadCallback);}
else if(window.attachEvent){io.attachEvent('onload',uploadCallback);}
else{io.addEventListener('load',uploadCallback,false);}},abort:function(o,callback,isTimeout)
{if(this.isCallInProgress(o)){o.conn.abort();window.clearInterval(this._poll[o.tId]);delete this._poll[o.tId];if(isTimeout){delete this._timeOut[o.tId];}
this.handleTransactionResponse(o,callback,true);return true;}
else{return false;}},isCallInProgress:function(o)
{if(o.conn){return o.conn.readyState!=4&&o.conn.readyState!=0;}
else{return false;}},releaseObject:function(o)
{o.conn=null;o=null;}};

function GetSpanByClass(cls){ 
var clses = [];
var childs = document.getElementsByTagName('SPAN');
for (var i=0; i<childs.length; i++) { if (childs[i].className==cls) clses[clses.length] = childs[i]; }
return clses;
}

function GetDivByClass(cls){ 
var clses = [];
var childs = document.getElementsByTagName('DIV');
for (var i=0; i<childs.length; i++) { if (childs[i].className==cls) clses[clses.length] = childs[i]; }
return clses;
}

function ParseXML(xml) {xml = xml.documentElement; 
if (xml == null) { alert("Server connection Error. Sorry."); } 
try{if(_resID){document.getElementById('myWinCont'+_resID).style.visibility='hidden';}}catch(e){}
for (var i = 0; i < xml.childNodes.length; i++) { 
if (xml.childNodes[i].nodeName == "cmd"){ var cmd; var target; var data; 
for (var j=0; j<xml.childNodes[i].attributes.length; j++) { 
if (xml.childNodes[i].attributes[j].name == "p") { cmd = xml.childNodes[i].attributes[j].value;} 
if (xml.childNodes[i].attributes[j].name == "t") { target = xml.childNodes[i].attributes[j].value; }}
if (xml.childNodes[i].firstChild.data ) { data = xml.childNodes[i].firstChild.data; } else { data = ''; } 
if (cmd=='innerHTML'){try{document.getElementById(target).innerHTML = data;}catch(e){} } 
else if (cmd=='+innerHTML'){ try{document.getElementById(target).innerHTML=data+document.getElementById(target).innerHTML;}catch(e){} } 
else if (cmd=='innerHTML+'){ try{document.getElementById(target).innerHTML+=data;}catch(e){} } 
else if (cmd=='innerHTMLspanAll'){ var tt=GetSpanByClass(target);for (var oo=0;oo<tt.length;oo++){try{tt[oo].innerHTML=data;}catch(e){} } }
else if (cmd=='innerHTMLdivAll'){ var tt=GetDivByClass(target);for (var oo=0;oo<tt.length;oo++){try{tt[oo].innerHTML=data;}catch(e){} } }
else if (cmd=='value'){ try{document.getElementById(target).value=data;}catch(e){} } 
else if (cmd=='jsa'){includeJSfile(data,target);} 
else if (cmd=='js'){ eval(data); } 
}}
try{if(_resID){_chLctSize(_resID)}}catch(e){}
}
var gotXML = function(o){ParseXML(o.responseXML); }
var failedResponse = function(o) {if (_is_log_form){try {_show_log_form();} catch(e){window.location.reload();}}else {window.location.reload();}}
var callback = {success: gotXML, failure: failedResponse }
var callbacku = {upload: gotXML}

function includeJSfile(src,id){
if (document.getElementById(id)){return;}
var js = document.createElement('script');
js.setAttribute('type','text/javascript');
js.setAttribute('id',id);
js.setAttribute('src',src);
var head = document.getElementsByTagName('head').item(0);
head.appendChild(js);	
}

var _entrRm={};
function _entrRem(bID,u,imgurl,text){
	if (!text){text='Are you sure?';}
	if (!_entrRm[bID] && confirm(text)){_entrRm[bID]=1;
		document.getElementById(bID).src=imgurl+'/img/fr/EmnAjax.gif';
		var cObj = uz.util.Connect.asyncRequest('GET',u,callback);
	}	
}

// ============================ //

function get_ajax_content(url,formName,multypart){
if (formName){
if (multypart){uz.util.Connect.setForm(formName,true); var cObj = uz.util.Connect.asyncRequest('POST',url,callbacku);}
else {uz.util.Connect.setForm(formName); var cObj = uz.util.Connect.asyncRequest('POST',url,callback);}}
else {var cObj = uz.util.Connect.asyncRequest('GET',url,callback);}	
return '';
}

var _umlparents=[]; //hash of mover _umlparents
var _umlcoords=[]; //hash of last layer _umlcoords for IE
var _resID='';
var _umlhave='';
var _umloffX,_umloffY,_umlscrX,_umlscrY;
var _uml_ie=0;
var _umlunable=0;
var _zindex=10000;
var _dontOnTop=0;
var _mwdH=400;
var _useShadow=0;

function openLayerB(n,f,u,t,w,h,resize,anyVar2,grid,multypart,align){
	if (!align){align='center';}
	if (resize){_resID=n;}else{_resID='';}
	h-=30;
	_zindex++;
	var scrw=(window.innerWidth ? window.innerWidth : (document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body.offsetWidth));
  	var scrh=(window.innerHeight ? window.innerHeight : (document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.offsetHeight));	
	//var scrw=document.body.clientWidth>0 ? document.body.clientWidth : window.innerWidth>0 ? window.innerWidth : document.body.offsetWidth;
	//var scrh=document.body.clientHeight>0 ? document.body.clientHeight : window.innerHeight>0 ? window.innerHeight : document.body.offsetHeight;
	if (scrh<450){_mwdH=scrh-50;}else{_mwdH=400;}
	var x = (scrw-w)/2;
	var y = (scrh-h)/2-20;
	if (!document.getElementById('newLayer'+n)){
		var o=document.createElement('div');
		o.id='newLayer'+n;
		document.body.appendChild(o);
		
		var os=document.createElement('div');
		os.id='newLayerSh'+n;
		document.body.appendChild(os);
	}
	else if (document.getElementById('newLayer'+n).style.display!='none'){
		_showOnTop(n);
		document.getElementById('layerContent'+n).innerHTML='<div align="left"><div class="myWinLoad"></div></div>';
		get_ajax_content(u,f,multypart);
		return '';
	}
		
	if (grid){
		var og;
		if (!document.getElementById('newLayerGrid')){
			og=document.createElement('div');
			og.id='newLayerGrid';
			document.body.appendChild(og);
			og.className='myWinGrid';
		}
		else {og=document.getElementById('newLayerGrid');}
		og.style.zIndex=_zindex;
		og.style.width=document.body.scrollWidth+'px';
		og.style.height=document.body.scrollHeight+'px';
		if (_uml_ie){
			og.style.left=document.body.scrollLeft;
			og.style.top=document.body.scrollTop;
		}
		else {og.style.position='fixed';}
		og.style.display='';
	}
	document.getElementById('newLayer'+n).innerHTML=''
+ '<div class="xw xw-plain" onclick="if(!_dontOnTop){_showOnTop(\''+n+'\')}else{_dontOnTop=0;}" id="outLayer'+n+'" style="position:absolute;z-index:'+(_zindex+2)+';top:'+y+'px;left:'+x+'px;width:'+w+'px;">'
+ '<div class="xw-tl" unselectable="on">'
+ '<div class="xw-tr">'
+ '<div class="xw-tc" align="left">'
+ '<div id="myWhead'+n+'" unselectable="on" onmouseup="_create_shadow(\''+n+'\');" class="xw-hdr x-unselectable xp-icon xw-draggable">'
+ '<div id="myWclose'+n+'" class="xt xt-close" onclick="_closeMyWin(\''+n+'\')"; onmouseover="this.className=\'xt xt-close xt-close-over\'" onmouseout="this.className=\'xt xt-close\'"></div>'
+ '<span unselectable="on" class="xw-hdr-text" id="layerTitle'+n+'">'+t+'</span></div>'
+ '</div></div></div>'
+ '<div class="xw-bwrap">'
+ '<div class="xw-ml">'
+ '<div class="xw-mr">'
+ '<div class="xw-mc" id="xw-mc'+n+'">'
+ '<div id="myWinBody'+n+'" class="xw-body" style="overflow:auto;height:'+h+'px;">'
+ '<div class="myWinCont" id="myWinCont'+n+'" style="padding:5px;width*:100%;"><div align="'+align+'" id="layerContent'+n+'"><div align="left"><div class="myWinLoad"></div></div></div></div>'
+ '</div></div></div></div></div>'
+ '<div class="xw-bl"><div class="xw-br">'
+ '<div class="xw-bc"><div class="xw-footer"></div>'
+ '</div></div></div></div>';

	get_ajax_content(u,f,multypart);
	document.getElementById('newLayer'+n).style.display='';
	_umlRegMover('myWhead'+n,'outLayer'+n);	
	if (!resize){
		_create_shadow(n);
	}
}	

function _showOnTop(n,f){
	if (f){
		if (parseInt(document.getElementById(n).style.zIndex)<(_zindex)){
			document.getElementById(n).style.zIndex=_zindex+3;
			_zindex+=3;
		}
	}
	else {
		if (parseInt(document.getElementById('outLayer'+n).style.zIndex)<(_zindex+2)){
			document.getElementById('outLayer'+n).style.zIndex=_zindex+3;
			try {document.getElementById('myWxs'+n).style.zIndex=_zindex+2;}catch(e){};
			_zindex+=1;
		}
	}
}

function _create_shadow(n){if (!_useShadow){return;}
document.getElementById('newLayerSh'+n).style.display='none';
var mww=document.getElementById('outLayer'+n).offsetWidth;
var mwh=document.getElementById('outLayer'+n).offsetHeight;
var mzi=document.getElementById('outLayer'+n).style.zIndex;

document.getElementById('newLayerSh'+n).innerHTML = ''
+ '<div id="myWxs'+n+'" class="x-sh" style="z-index:'+(mzi-1)+';width:'+(mww+10)+'px;height:'+(mwh+10)+'px;display:block;">' 
+ '<div class="xst">'
+ '<div class="xstl"> </div>'
+ '<div class="xstc" style="width:'+(mww-8)+'px;"></div>'
+ '<div class="xstr"></div></div>' 
+ '<div id="xsc'+n+'" style="height:'+(mwh-8)+'px;">'
+ '<div class="xsml"></div>'
+ '<div class="xsmc" style="width:'+(mww-8)+'px;"></div>'
+ '<div class="xsmr"></div></div>' 
+ '<div class="xsb"><div class="xsbl"></div>'
+ '<div class="xsbc" style="width:'+(mww-8)+'px;"></div>'
+ '<div class="xsbr"></div></div></div>';	

_shcoords('outLayer'+n);	
	document.getElementById('newLayerSh'+n).style.display='';	
}

function _shcoords(id){if (!_useShadow){return;}
	if (!id){return;}
	var n = id.substr(8);	
	if (!document.getElementById('myWxs'+n)){return;}
	var _shadw = document.getElementById('myWxs'+n);
	var pos=_umlGetCoord(document.getElementById('outLayer'+n));
	if(!_uml_ie) {
		_shadw.style.position='fixed';
		_shadw.style.overflow='auto';
		_shadw.style.left=(pos['left'])+'px';
		_shadw.style.top=(pos['top'])+'px';
	}
	else {
		_shadw.style.left=(pos['left']-3)+'px';
		_shadw.style.top=(pos['top']-3)+'px';
		_shadw.style.filter = 'progid:DXImageTransform.Microsoft.alpha(opacity=50) progid:DXImageTransform.Microsoft.Blur(pixelradius=3);';
	}
	
}

function _closeMyWin(n){
	document.getElementById('layerContent'+n).innerHTML='';
	document.getElementById('newLayer'+n).style.display='none';
	try{document.getElementById('newLayerSh'+n).style.display='none';}catch(e){}
	try{document.getElementById('newLayerGrid').style.display='none'}catch(e){}	
}

var _cur_size8,_tar_size8,_dk_step8;
function _chLctSize(w1){
	if (!document.getElementById('myWinBody'+w1) || !document.getElementById('layerContent'+w1)){return;}
	var step=10;
	var incr=_uml_ie?4:4;
	_cur_size8 = parseInt(document.getElementById('myWinBody'+w1).style.height);
	_tar_size8 = document.getElementById('myWinCont'+w1).offsetHeight+incr;
	if (_tar_size8<40){_tar_size8=40;}else if (_tar_size8>_mwdH){_tar_size8=_mwdH;}
	
	if (_cur_size8>_tar_size8){_dk_step8=-step;if(_cur_size8-_tar_size8<step){_dk_step8=-(_cur_size8-_tar_size8);}}
	else{_dk_step8=step;if(_tar_size8-_cur_size8<_dk_step8){_dk_step8=_tar_size8-_cur_size8;}}
	setTimeout('_chLctSizeTimer("'+w1+'")',10);
}
function _chLctSizeTimer(w1){
	if ((_dk_step8>0 && _cur_size8<=_tar_size8-_dk_step8) || (_dk_step8<0 && _cur_size8>=_tar_size8-_dk_step8)){
		document.getElementById('newLayerSh'+w1).style.display='none';
		if (_dk_step8>0&&(_tar_size8-_cur_size8-_dk_step8<_dk_step8)){_dk_step8=_tar_size8-_cur_size8;}
		else if (_dk_step8<0&&(_tar_size8-_cur_size8-_dk_step8>_dk_step8)){_dk_step8=_tar_size8-_cur_size8;}
		_cur_size8+=_dk_step8;
		var newtop = parseInt(document.getElementById('outLayer'+w1).style.top)-parseInt(_dk_step8/2);
		if ((_uml_ie && newtop>=document.body.scrollTop) || (!_uml_ie && newtop>=0)){document.getElementById('outLayer'+w1).style.top=newtop;}
		document.getElementById('myWinBody'+w1).style.height=_cur_size8+'px';		
		setTimeout('_chLctSizeTimer("'+w1+'")',10);
	}
	else {
		_resID='';
		document.getElementById('myWinCont'+w1).style.visibility='visible';
		_create_shadow(w1);
	}
}

if (document.addEventListener){
	document.addEventListener('mouseup',_umlUp,false);
	document.addEventListener('mousemove',_umlMove,false);
}
else if (window.attachEvent){
	document.attachEvent('onmouseup', _umlUp);
	document.attachEvent('onmousemove', _umlMove);
	window.attachEvent('onscroll', _umlScroll);
	_uml_ie=1;
} else {
	_umlunable=1;
}
var _entrRm={};
function _entrRem(bID,u,imgurl,text){
	if (!text){text='Are you sure?';}
	if (!_entrRm[bID] && confirm(text)){_entrRm[bID]=1;
		document.getElementById(bID).src=imgurl+'/img/fr/EmnAjax.gif';
		var cObj = uz.util.Connect.asyncRequest('GET',u,callback);
	}	
}

function _umlGetCoord(obj){
	if(!obj) return { 'left' : 0, 'top' : 0 };
	var left_offset = obj.offsetLeft;
	var top_offset = obj.offsetTop;
	if(!left_offset && !top_offset && obj.offsetParent==null) {
	left_offset=parseInt(obj.style.left);
	top_offset=parseInt(obj.style.top);
	} else
	while ((obj = obj.offsetParent) != null)
	{
		left_offset += obj.offsetLeft;
		top_offset += obj.offsetTop;
	}

	return { 'left' : left_offset, 'top' : top_offset };
}

function _umlRegMover(mover,movparent) {
	if(_umlunable) return;
	var it=document.getElementById(mover);
	var itpar=document.getElementById(movparent);
	if(!it || !itpar) return;
	if(!_uml_ie && itpar.style.position!='fixed') {itpar.style.position='fixed';}
	_umlparents[mover]=itpar;
	if(_uml_ie) {
		_umlscrX=document.body.scrollLeft;
		_umlscrY=document.body.scrollTop;
		var pos=_umlGetCoord(itpar);
		_umlcoords[mover]=[pos['left']+_umlscrX,pos['top']+_umlscrY];

		itpar.style.left=_umlcoords[mover][0]+'px';
		itpar.style.top=_umlcoords[mover][1]+'px';

		it.attachEvent('onmousedown',_umlDown);
	}
		else it.addEventListener('mousedown',_umlDown,false);
	it.style.cursor="move";
}

function _umlMove(e) {
	if(_uml_ie) e=event;
	if(!_umlhave) return;
	var n = _umlparents[_umlhave.id].id.substr(8);
	document.getElementById('newLayerSh'+n).style.display='none';
	if(_uml_ie && (e.button&1)==0) {_umlUp(e);return;}
	_umlparents[_umlhave.id].style.left=(_umloffX+e.clientX)+'px';
	_umlparents[_umlhave.id].style.top=(_umloffY+e.clientY)+'px';
	if(window.getSelection){
		window.getSelection().removeAllRanges();
	} 
	else if(document.selection) {
		if(document.selection.type!='none') document.selection.empty();
	}
}

function _umlScroll(e) {
	if(_uml_ie) e=event;
	for(var i in _umlcoords) {
		var newx=_umlcoords[i][0]+document.body.scrollLeft-_umlscrX;
		if(newx+_umlparents[i].offsetWidth<document.body.scrollWidth) _umlparents[i].style.left=newx+'px';
		var newy=_umlcoords[i][1]+document.body.scrollTop-_umlscrY;
		if(newy+_umlparents[i].offsetHeight<document.body.scrollHeight) _umlparents[i].style.top=newy+'px';
		if (_useShadow){_shcoords(_umlparents[i].id);}
	}
}


function _umlDown(e) {
	if(_uml_ie) {
		if(!_umlparents[event.srcElement.id]) return;
		e=event;
		if(e.button && (e.button&1)!=1) return;
		_umlhave=e.srcElement;
	} 
	else {
		_umlhave=this;
		e.stopPropagation();
	}
	var pos=_umlGetCoord(_umlparents[_umlhave.id]);
	_umloffX=pos['left']-e.clientX;
	_umloffY=pos['top']-e.clientY;
	if(_uml_ie){
		_umlscrX=document.body.scrollLeft;
		_umlscrY=document.body.scrollTop;
		var pos=_umlGetCoord(_umlparents[_umlhave.id]);
		_umlcoords[_umlhave.id]=[pos['left'],pos['top']];
	}
}

function _umlUp(e) {
	if(!_umlhave) return;
	if(_uml_ie){
		var pos=_umlGetCoord(_umlparents[_umlhave.id]);
		_umlcoords[_umlhave.id]=[pos['left'],pos['top']];
	}
	_umlhave=0;
}

function _coloredTDs(r,c){
	var cl='';
	if (typeof(r)!='object'){r=document.getElementById(r);}
	if (typeof(document.getElementsByTagName)!='undefined'){cl=r.getElementsByTagName('td');}
	else if (typeof(r.cells)!='undefined') {cl=r.cells;}
	else {return false;}
	for (var i=0;i<cl.length;i++) {
		cl[i].className=c;
	}
}
