//字符串的
String.prototype.trim = function(){
	return this.replace(/(^[ |　]*)|([ |　]*$)/g, "");
}
String.prototype.getQuery = function(name){
	var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
	var r = this.substr(this.indexOf("\?")+1).match(reg);
	if(r!=null){
		return unescape(r[2]);
	}
	return null;
}
String.prototype.cn_length = function(){
	var i, sum;
	sum = 0;
	for(i=0; i < this.length; i++){
		sum ++;
		if (this.charCodeAt(i) > 255){
	  		sum ++;
	  	}
	}
	return sum;
}
String.prototype.cn_substring = function(len){
	var a = 0;
	var tmp = "";
	for (var i = 0; i < len; i++){
		if (this.charCodeAt(i) > 255){
			a += 2;
		}
		else{
			a++;
		}
		if(a > len){
			return tmp;
		}
		tmp += this.charAt(i); 
	}
	return tmp;
}

String.prototype.replaceAll = stringReplaceAll;

function stringReplaceAll(AFindText,ARepText){
 var raRegExp = new RegExp(AFindText.replace(/([\(\)\[\]\{\}\^\$\+\-\*\?\.\"\'\|\/\\])/g,"\\$1"),"ig");
 return this.replace(raRegExp,ARepText);
}
//一些缩写
function dws(str)
{
    document.write(str);
}
function $(s){
	if(document.getElementById){
		return document.getElementById(s);
	}
	else{
		return document.all[s];
	}
}
function $n(s, o){
	if (o == null){
		return document.getElementsByName(s);
	}
	else{
		return o.getElementsByName(s);
	}
}
function $t(s, o){
	if (o == null){
		return document.getElementsByTagName(s);
	}
	else{
		return o.getElementsByTagName(s);
	}
}
function $r(s){
	for (var i = 0; i < $n(s).length; i++){
		if ($n(s)[i].checked)
			return $n(s)[i]; 
	}
}
function $$(s){
	return document.frames?document.frames[s]:$(s).contentWindow;
}
function $c(s){
	return document.createElement(s);
}
//--
function exist(s){
	return s != null;
}
function hidden(objId){
	 $(objId).style.display = 'none';
}
function show(objId){
	$(objId).style.display = 'block';
}
function $F(objId){
//    try{$(objId).value}catch(e){alert(objId);}
	return $(objId).value;
}
function setCopy(_sTxt){
	try {
		clipboardData.setData('Text',_sTxt)
		return true;
	}
	catch(e){
		return false;
	}
}



function ShowLoading()
{
   $('LoadingDiv').style.top=GetScrollTop()+300+"px";
   $('LoadingDiv').style.left=350+"px";
   show('LoadingDiv');  
}
function HiddenLoading()
{
    hidden('LoadingDiv');
}
function ShowWindow(objId)
{
    show(objId);
    $(objId).style.top='30px';//GetScrollTop()+200+"px";
    $(objId).style.left='3px';//350+"px";
}
function ShowBoard(objId)
{
    $(objId).style.top=yPos+'px';
    $(objId).style.left=xPos+'px';
    show(objId);
}
function ShowDone(Str)
{
    if(Str.length!=0){
       $('OperationText').innerHTML=Str;
    }
    $('OperationDone').style.top=GetScrollTop()+300+"px";
    $('OperationDone').style.left=350+"px";
    FadeOut('OperationDone');
}

var sTimer;
function FadeOut(id)
{
    show(id);
    try{clearInterval(sTimer);}catch(e){};
    var Browser =KonyelGetBrowser();
    var IEOpacity=100,FFOpacity=1;
    if(Browser=='IE'){
      
      }
    else{
       $(id).style.MozOpacity =FFOpacity;};
    var i=0;
    sTimer=setInterval(function ()
    {
      if(i<42&&i>20)
      {
         if(Browser=='IE'){
             IEOpacity=IEOpacity-5;
             $(id).style.filter = "alpha(opacity="+IEOpacity+")";

          }
          if(Browser=='FF'){
             FFOpacity=FFOpacity-0.05
             $(id).style.MozOpacity =FFOpacity;
          }
       }
       if(i>41){
          clearInterval(sTimer);
          $(id).style.filter = "alpha(opacity=100)";
          hidden(id);
       }
       i++;
    },50
   );
   
}



// 淡入淡出函数
var dur=20;
function fade(id,c1,c2){
    try{clearInterval(fadesTimer);}catch(e){};
	var txt=document.getElementById(id);
	var ri=sprRGB(c1,0),bi=sprRGB(c1,1),gi=sprRGB(c1,2);
	var ro=sprRGB(c2,0),bo=sprRGB(c2,1),go=sprRGB(c2,2);
	var st=0,fadesTimer = setInterval(function(){
		if(st!=dur){
			with(Math)var rs=floor((ri-ro)/(dur-st)),bs=floor((bi-bo)/(dur-st)),gs=floor((gi-go)/(dur-st));
			ro+=rs;bo+=bs;go+=gs;
			txt.style.backgroundColor='rgb('+ro+','+bo+','+go+')';
		}
		else clearInterval(fadesTimer);
		st++;
	},50);
}

// 分离RGB颜色 0:R | 1:G | 2:B
function sprRGB(c,x){
	var p,l;
	c.length==4?l=1:l=2;
	p=x*l+1;
	c=c.substr(p,l)
	if(c.length==1)c+=c;
	return parseInt(c,16);
}
///区分浏览器
function KonyelGetBrowser()
{
	var browser = '';
	var agentInfo = navigator.userAgent.toLowerCase();
	if (agentInfo.indexOf("msie") > -1) {
		var re = new RegExp("msie\\s?([\\d\\.]+)","ig");
		var arr = re.exec(agentInfo);
		if (parseInt(RegExp.$1) >= 5.5) {
			browser = 'IE';
		}
	} else if (agentInfo.indexOf("firefox") > -1) {
		browser = 'FF';
	} else if (agentInfo.indexOf("netscape") > -1) {
		var temp1 = agentInfo.split(' ');
		var temp2 = temp1[temp1.length-1].split('/');
		if (parseInt(temp2[1]) >= 7) {
			browser = 'NS';
		}
	} else if (agentInfo.indexOf("gecko") > -1) {
		browser = 'ML';
	} else if (agentInfo.indexOf("opera") > -1) {
		var temp1 = agentInfo.split(' ');
		var temp2 = temp1[0].split('/');
		if (parseInt(temp2[1]) >= 9) {
			browser = 'OPERA';
		}
	}
	return browser;
}
//GetScrollTop()获取页面顶部

var w3c=(document.getElementById)? true: false;
var agt=navigator.userAgent.toLowerCase();
var ie = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1) && (agt.indexOf("omniweb") == -1));

function IeTrueBody()
{
  return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body;
}
function GetScrollTop(){
  return ie ? IeTrueBody().scrollTop : window.pageYOffset;
}



AjaxPager = Class.create();
AjaxPager.prototype = {
    initialize:function(Id,functionName,ObjectName)
    {   
        this.functionName=functionName;
        this.PageDivId=Id;
        this.ObjectName=ObjectName;
        //
        this.PageListIndex=0;
        this.PageListSize=5;
        //
        this.StatIndex;
        this.EndIndex;
        this.PageListSum;
        //
        this.TotalPage;
        this.CurrentPage=1;
        
        //
        this.PagerType='Default';
        this.Display;
    },
    GetPageContent:function()
    {
        if(this.PagerType=='Default'){this.Display='block'}else{this.Display='none'}  
        var PageContent="";
        PageContent+='<div class="p_"><img\
                        src="/images/sign/2007012314-19.gif" style="display:'+this.Display+'" class="p_go" onclick="'+this.ObjectName+'.PageListCommend(\'previous\');" /><img\
                        src="/images/sign/2007012314-20.gif"  onclick="'+this.functionName+'(\'previous\');" class="p_go" />';
        this.CountPageList();
        for(i=this.StatIndex;i<this.EndIndex;i++)
        {
            if(this.CurrentPage==(i+1)){
              PageContent+='<span class="p_c" style="display:'+this.Display+'" onclick="'+this.functionName+'(\''+(i+1)+'\')">'+(i+1)+'</span>';
            }
            else{
              PageContent+='<span class="p_b" style="display:'+this.Display+'" onclick="'+this.functionName+'(\''+(i+1)+'\')">'+(i+1)+'</span>';
            }
        
        }                
        PageContent+='<img\
                          src="/images/sign/2007121314-19.gif" class="p_go" onclick="'+this.functionName+'(\'next\')" /><img style="display:'+this.Display+'" \
                        src="/images/sign/2007121314-20.gif" class="p_go" onclick="'+this.ObjectName+'.PageListCommend(\'next\');" /><input type="text" style="width: 30px;display:'+this.Display+'; \
                            height: 16px; border: solid 1px #BABABA; float: left; text-indent: 3px; margin-right:4px;" id="'+this.ObjectName+'PageNum" /><img  style="display:'+this.Display+'" \
                        src="/images/sign/2008012315-03.gif" class="p_go" onclick="'+this.ObjectName+'.PageToNumberPage();" /><span\
                                class="p_bu font535353">'+this.CurrentPage+'/'+this.TotalPage+'页</span></div>';
        $(this.PageDivId).innerHTML=PageContent;
    },
//    <div class="p_"><input type="image"
//                                src="images/sign/2007012314-19.gif" class="p_go" /><input type="image"
//                                src="images/sign/2007012314-20.gif" class="p_go" />
//                        <span class="p_c"><a href="123">1</a></span><span class="p_b"><a href="1234343">2</a></span><input
//                            type="image" src="images/sign/2007121314-19.gif" class="p_go" /><input type="image"
//                                src="images/sign/2007121314-20.gif" class="p_go" /><input type="text" style="width: 30px;
//                                    height: 16px; border: solid 1px #BABABA; float: left; text-indent: 3px; margin-right:4px;" /><input type="image"
//                                src="images/sign/2008012315-03.gif" class="p_go" /><span
//                                        class="p_bu font535353">2455 | 1/123页</span></div>
    RefreshPager:function(TotalPage,CurrentPage)
    {   
        if(TotalPage==0) {
           hidden(this.PageDivId);
        }
        else{
          show(this.PageDivId);
        }
        this.TotalPage=TotalPage;
        this.CurrentPage=CurrentPage;
        this.GetPageContent();
    },
    CountPageList:function()
    {
        if((this.CurrentPage%this.PageListSize)==0){
            this.PageListIndex = this.CurrentPage/this.PageListSize-1;}
        else{  
            this.PageListIndex = Math.ceil(this.CurrentPage/this.PageListSize)-1;}
         if((this.TotalPage%this.PageListSize)==0){
            this.PageListSum = this.TotalPage/this.PageListSize;}
        else{  
            this.PageListSum = Math.ceil(this.TotalPage/this.PageListSize);}
        this.StatIndex=this.PageListIndex*this.PageListSize;
        if(this.PageListIndex>=this.PageListSum-1){
           this.EndIndex = this.TotalPage;
        }
        else{
          this.EndIndex = (parseInt(this.PageListIndex)+1)*this.PageListSize;
        }
    },
    PageListCommend:function(Commend)
    {
        if(Commend=='previous'){
             if(this.PageListIndex-1>=0){
                 this.PageListIndex=this.PageListIndex-1;               
             }
        }
        else{
            if(this.PageListIndex<this.PageListSum-1){
                this.PageListIndex=this.PageListIndex+1;
            }
        }
        this.CurrentPage=this.PageListIndex*this.PageListSize+1;
        this.GetPageContent();
        eval(this.functionName+'(\''+this.CurrentPage+'\')');
    },
    PageToNumberPage:function()
    {
        if($F(this.ObjectName+'PageNum')>0&&$F(this.ObjectName+'PageNum')<this.TotalPage+1){
           eval(this.functionName+'(\''+$F(this.ObjectName+'PageNum')+'\')');
        }
    }
}

AjaxRepeat = Class.create();
AjaxRepeat.prototype = {
    initialize:function(Id){  
       this.ElementId=Id;
       this.DataSource;
       this.Item;  
       this.Pager;
       this.Para;
       this.TotalPage;
       this.CurrentPage=1;
       this.NullBoard='';
    },
    DataBind:function(){
        var Result=eval(this.DataSource);
        this.TotalPage=Result.TotalPage;
        this.CurrentPage=Result.CurrentIndex;
        var strTemp,content="";
         if(Result.Data.length!=0){
             for(i=0;i<Result.Data.length;i++){
               if(Result.Data[i]!=null)
               {
                     strTemp=this.Item;
                     for(j=0;j<this.Para.length;j++)
                     { 
                        strTemp=strTemp.replaceAll('$'+this.Para[j]+'$',eval('Result.Data[i].'+this.Para[j]));
                     }  
                     content+=strTemp;
                }
             }
         }
         else{
             content=this.NullBoard;
         }
         $(this.ElementId).innerHTML=content;
    } 
}
AjaxSelect= Class.create();
AjaxSelect.prototype = {
     initialize:function(Id,SelectId){  
         this.ElementId=Id;
         this.SelectId=SelectId;
         this.DataSource;
         this.Width=140;
     },
     Get:function(Value,Text){
         var Result=this.DataSource;
         var Content="";
         Content+='<select id="'+this.SelectId+'" style="width:'+this.Width+'px;">';
         for(i=0;i<Result.length;i++)
         {
            Content+='<option value='+eval('Result[i].'+Value)+'>';
            Content+=   eval('Result[i].'+Text);
            Content+='</option>';
         }
         Content+='</select>';
         $(this.ElementId).innerHTML=Content;
     }
}
//iframe加载异步调用
function stateChangeIE(_frame,IframeFunction)
{ 
 if (_frame.readyState=="interactive"){
   IframeFunction();
 }   
}
function stateChangeFirefox(_frame,IframeFunction){ 
 var Browser =KonyelGetBrowser();
 if(Browser=='FF'){ IframeFunction();}
}










var Demos       = [];
var nDemos      = 8;

// Demo variables
// iMouseDown represents the current mouse button state: up or down
/*
lMouseState represents the previous mouse button state so that we can
check for button clicks and button releases:

if(iMouseDown && !lMouseState) // button just clicked!
if(!iMouseDown && lMouseState) // button just released!
*/
var mouseOffset = null;
var iMouseDown  = false;
var lMouseState = false;
var dragObject  = null;

// Demo 0 variables
var DragDrops   = [];
var curTarget   = null;
var lastTarget  = null;
var dragHelper  = null;
var tempDiv     = null;
var rootParent  = null;
var rootSibling = null;


// Demo1 variables
var D1Target    = null;

Number.prototype.NaN0=function(){return isNaN(this)?0:this;}

function CreateDragContainer(){
	/*
	Create a new "Container Instance" so that items from one "Set" can not
	be dragged into items from another "Set"
	*/
	var cDrag        = DragDrops.length;
	DragDrops[cDrag] = [];

	/*
	Each item passed to this function should be a "container".  Store each
	of these items in our current container
	*/
	for(var i=0; i<arguments.length; i++){
		var cObj = arguments[i];
		DragDrops[cDrag].push(cObj);
		cObj.setAttribute('DropObj', cDrag);

		/*
		Every top level item in these containers should be draggable.  Do this
		by setting the DragObj attribute on each item and then later checking
		this attribute in the mouseMove function
		*/
		for(var j=0; j<cObj.childNodes.length; j++){

			// Firefox puts in lots of #text nodes...skip these
			if(cObj.childNodes[j].nodeName=='#text') continue;

			cObj.childNodes[j].setAttribute('DragObj', cDrag);
		}
	}
}



function getPosition(e){
	var left = 0;
	var top  = 0;
	while (e.offsetParent){
		left += e.offsetLeft + (e.currentStyle?(parseInt(e.currentStyle.borderLeftWidth)).NaN0():0);
		top  += e.offsetTop  + (e.currentStyle?(parseInt(e.currentStyle.borderTopWidth)).NaN0():0);
		e     = e.offsetParent;
	}


	left += e.offsetLeft + (e.currentStyle?(parseInt(e.currentStyle.borderLeftWidth)).NaN0():0);
	top  += e.offsetTop  + (e.currentStyle?(parseInt(e.currentStyle.borderTopWidth)).NaN0():0);

	return {x:left, y:top};

}

function mouseCoords(ev){
	if(ev.pageX || ev.pageY){
		return {x:ev.pageX, y:ev.pageY};
	}
	return {
		x:ev.clientX + document.body.scrollLeft - document.body.clientLeft,
		y:ev.clientY + document.body.scrollTop  - document.body.clientTop
	};
}



function getMouseOffset(target, ev){
	ev = ev || window.event;

	var docPos    = getPosition(target);
	var mousePos  = mouseCoords(ev);
	return {x:mousePos.x - docPos.x, y:mousePos.y - docPos.y};
}

function mouseMove(ev){
	ev         = ev || window.event;

	/*
	We are setting target to whatever item the mouse is currently on

	Firefox uses event.target here, MSIE uses event.srcElement
	*/
	
	var ChildTarget = ev.target || ev.srcElement;
	var target=ChildTarget.parentNode
	var mousePos = mouseCoords(ev);

	
		// mouseOut event - fires if the item the mouse is on has changed


		/*
		dragObj is the grouping our item is in (set from the createDragContainer function).
		if the item is not in a grouping we ignore it since it can't be dragged with this
		script.
		*/
		try{
		var dragObj = target.getAttribute('DragObj');
        }
        catch(e)
        {
        
        }

		 // if the mouse was moved over an element that is draggable
		if(dragObj!=null){

	
            
			// if the user is just starting to drag the element
			if(iMouseDown && !lMouseState){
				

				// mouseDown target
				curTarget     = target;

				// Record the mouse x and y offset for the element
				rootParent    = curTarget.parentNode;
				rootSibling   = curTarget.nextSibling;

				mouseOffset   = getMouseOffset(target, ev);

				// We remove anything that is in our dragHelper DIV so we can put a new item in it.
				for(var i=0; i<dragHelper.childNodes.length; i++) 
				{
				   dragHelper.removeChild(dragHelper.childNodes[i]);}

				// Make a copy of the current item and put it in our drag helper.
				dragHelper.appendChild(curTarget.cloneNode(true));
				dragHelper.style.display = 'block';

				dragHelper.style.width="400px";
				

				// set the class on our helper DIV if necessary
		

				// disable dragging from our helper DIV (it's already being dragged)
				dragHelper.firstChild.removeAttribute('DragObj');

				/*
				Record the current position of all drag/drop targets related
				to the element.  We do this here so that we do not have to do
				it on the general mouse move event which fires when the mouse
				moves even 1 pixel.  If we don't do this here the script
				would run much slower.
				*/
				var dragConts = DragDrops[dragObj];

				/*
				first record the width/height of our drag item.  Then hide it since
				it is going to (potentially) be moved out of its parent.
				*/
				curTarget.setAttribute('startWidth',  parseInt(curTarget.offsetWidth));
				curTarget.setAttribute('startHeight', parseInt(curTarget.offsetHeight));
				curTarget.style.display  = 'none';
                UC_UCNavigation.DeleteModelContent(yyId_Global,curTarget.id.substring(0,curTarget.id.length-3),SetModelcallback);
				// loop through each possible drop container
				for(var i=0; i<dragConts.length; i++){
					with(dragConts[i]){
						var pos = getPosition(dragConts[i]);

						/*
						save the width, height and position of each container.

						Even though we are saving the width and height of each
						container back to the container this is much faster because
						we are saving the number and do not have to run through
						any calculations again.  Also, offsetHeight and offsetWidth
						are both fairly slow.  You would never normally notice any
						performance hit from these two functions but our code is
						going to be running hundreds of times each second so every
						little bit helps!

						Note that the biggest performance gain here, by far, comes
						from not having to run through the getPosition function
						hundreds of times.
						*/
						setAttribute('startWidth',  parseInt(offsetWidth));
						setAttribute('startHeight', parseInt(offsetHeight));
						setAttribute('startLeft',   pos.x);
						setAttribute('startTop',    pos.y);
					}

					// loop through each child element of each container
					for(var j=0; j<dragConts[i].childNodes.length; j++){
						with(dragConts[i].childNodes[j]){
							if((nodeName=='#text') || (dragConts[i].childNodes[j]==curTarget)) continue;

							var pos = getPosition(dragConts[i].childNodes[j]);
                            
							// save the width, height and position of each element
							setAttribute('startWidth',  parseInt(offsetWidth));
							setAttribute('startHeight', parseInt(offsetHeight));
							setAttribute('startLeft',   pos.x);
							setAttribute('startTop',    pos.y);
						}
					}
				}
			}
		}

		// If we get in here we are dragging something
		if(curTarget){
			// move our helper div to wherever the mouse is (adjusted by mouseOffset)
			dragHelper.style.top  = (mousePos.y-100)+'px';
			dragHelper.style.left = mousePos.x-70+'px';
             
			

			var dragConts  = DragDrops[curTarget.getAttribute('DragObj')];
			var activeCont = null;

			var xPos =mousePos.x;
			var yPos =mousePos.y;
			
			

			for(var i=0; i<dragConts.length; i++){
				with(dragConts[i]){
					if((parseInt(getAttribute('startLeft'))                                           < xPos) &&
						(parseInt(getAttribute('startTop'))                                            < yPos) &&
						((parseInt(getAttribute('startLeft')) + parseInt(getAttribute('startWidth')))  > xPos) &&
						((parseInt(getAttribute('startTop'))  + parseInt(getAttribute('startHeight'))) > yPos)){
                        
							/*
							our target is inside of our container so save the container into
							the activeCont variable and then exit the loop since we no longer
							need to check the rest of the containers
							*/
							activeCont = dragConts[i];

							// exit the for loop
							break;
					}
				}
			}

			// Our target object is in one of our containers.  Check to see where our div belongs
			if(activeCont){
				if(activeCont!=curTarget.parentNode){
					
				}

				// beforeNode will hold the first node AFTER where our div belongs
				var beforeNode = null;

		          
          
				// loop through each child node (skipping text nodes).
				for(var i=activeCont.childNodes.length-1; i>=0; i--){
					with(activeCont.childNodes[i]){
						if(nodeName=='#text') continue;

						// if the current item is "After" the item being dragged
						if(curTarget != activeCont.childNodes[i]                                                  &&
					
							((parseInt(getAttribute('startTop'))  + parseInt(getAttribute('startHeight'))) > yPos)
							
							
							
						 ){
								beforeNode = activeCont.childNodes[i];
						}
					}
				}

				// the item being dragged belongs before another item
				if(beforeNode){
					if(beforeNode!=curTarget.nextSibling){
						activeCont.insertBefore(curTarget, beforeNode);
					}

				// the item being dragged belongs at the end of the current container
				} else {
					if((curTarget.nextSibling) || (curTarget.parentNode!=activeCont)){	
						activeCont.appendChild(curTarget);
					}
				}

				// the timeout is here because the container doesn't "immediately" resize
				setTimeout(function(){
				var contPos = getPosition(activeCont);
				activeCont.setAttribute('startWidth',  parseInt(activeCont.offsetWidth));
				activeCont.setAttribute('startHeight', parseInt(activeCont.offsetHeight));
				activeCont.setAttribute('startLeft',   contPos.x);
				activeCont.setAttribute('startTop',    contPos.y);}, 5);

				// make our drag item visible
				if(curTarget.style.display!=''){
					
					curTarget.style.display    = '';
					curTarget.style.visibility = 'hidden';
					UC_UCNavigation.DeleteModelContent(yyId_Global,curTarget.id.substring(0,curTarget.id.length-3),SetModelcallback);
				}
			} else {

				// our drag item is not in a container, so hide it.
				if(curTarget.style.display!='none'){
					
					curTarget.style.display  = 'none';
					UC_UCNavigation.DeleteModelContent(yyId_Global,curTarget.id.substring(0,curTarget.id.length-3),SetModelcallback);
				}
			}
		}

		// track the current mouse state so we can compare against it next time
		lMouseState = iMouseDown;

		// mouseMove target
		lastTarget  = target;
	


	if(dragObject){
		dragObject.style.position = 'absolute';
		dragObject.style.top      = mousePos.y - mouseOffset.y;
		dragObject.style.left     = mousePos.x - mouseOffset.x;
	}

	// track the current mouse state so we can compare against it next time
	lMouseState = iMouseDown;

	// this prevents items on the page from being highlighted while dragging
	if(curTarget || dragObject) return false;
}

function mouseUp(ev){

	
		if(curTarget){

			dragHelper.style.display = 'none';
			if(curTarget.style.display == 'none'){
				if(rootSibling){
					
					
				} else {
					
					
				}
				
			}
		

			curTarget.style.display    = '';
			
			curTarget.style.visibility = 'visible';
			//ShowDone(curTarget.id.substring(0,curTarget.id.length-3));
			UC_UCNavigation.AddModelContent(yyId_Global,curTarget.parentNode.id,curTarget.id.substring(0,curTarget.id.length-3),SetModelcallback);
			
			
		}
		curTarget  = null;
	

	dragObject = null;

	iMouseDown = false;
}

function mouseDown(ev){
	ev         = ev || window.event;
	var ChildTarget = ev.target || ev.srcElement;
	var target=ChildTarget.parentNode
	
	iMouseDown = true;
	
	if(target.onmousedown || target.getAttribute('DragObj')){
		return false;
	}
}

function makeDraggable(item){
	if(!item) return;
	item.onmousedown = function(ev){
		dragObject  = this;
		mouseOffset = getMouseOffset(this, ev);
		return false;
	}
}

function makeClickable(item){
	if(!item) return;
	item.onmousedown = function(ev){
		document.getElementById('ClickImage').value = this.name;
	}
}

function addDropTarget(item, target){
	item.setAttribute('droptarget', target);
}

document.onmousemove = mouseMove;
document.onmousedown = mouseDown;
document.onmouseup   = mouseUp;


