function GAM () {	this.gamArea={};		/*private vars, do not modify*/	this.currWindowObj=null;	if (typeof (this.constructor.prototype.PrototypeFinishedgam) == 'undefined') {		this.constructor.prototype.Register=Register;		this.constructor.prototype.Unregister=Unregister;		this.constructor.prototype.Get=Get;		this.constructor.prototype.InitPage=InitPage;				this.constructor.prototype.PrototypeFinishedgam=true;	};		function Register (name, obj){		this.gamArea [name] = obj;	};	function Unregister (name){		this.gamArea [name] = null;		delete this.gamArea [name];	};		function Get (name){		return this.gamArea [name];	};		function InitPage (obj){		var initTags = obj.document.getElementsByTagName ("SF:INIT");		this.currWindowObj=obj;				obj.ProcessIabControls ();	};	};iabGam$$$Object = null;function GetGAM (){	if (!top.frames) return iabGam$$$Object;		for (var i = 0; i< top.frames.length; i ++){			try{			if (top.frames [i].gamObj) {				return top.frames [i].gamObj;			};		}		catch (e){		};	};		return iabGam$$$Object;};function WaitGAMToInit (obj, dialogPage,uPk){	ff$ff$ffwgi=function () {		WaitGAMToInit11 (obj, dialogPage ? dialogPage : null,uPk ? uPk : null);	};		setTimeout ("ff$ff$ffwgi ()", 20);};function WaitGAMToInit11 (obj, dialogPage,uPk){	var isOpr = isOpera ();	if (isOpr){		if (obj.parentNode) {			obj = obj.parentNode.parentNode.parentWindow;		};	};	/*nonie designer */	if (obj.location.href.indexOf ("$$$NONIE_DES$$$") > -1) {		/*iab_nddm_12321=new IabDDMan ();		iab_nddm_12321.Start ();*/		return;	};   	var dp = arguments.length == 1 || ((typeof (dialogPage) == "undefined" || dialogPage == null) && (typeof (uPk) == "undefined" ||uPk == null));		if (obj == top && dp){		var url = escape (obj.location.href);		var host = obj.location.host;		var pathName = obj.location.pathname;		var locPath = pathName.split ("/");				top.location.href= "http://" + host + locPath [0] + "/main?AC=showPage&pageNum=150&url=" + url;		return;	};	var gam = null;			if (typeof (dialogPage) != "undefined" && dialogPage != null) {		gam = new GAM ();		iabGam$$$Object = gam;		var userInfo = {userPk:uPk};		gam.Register ('userInfo', userInfo);		gam.Register ('hkMaster', new HotkeyMaster ());	}	else {		gam = GetGAM ();	};			if (gam && gam.Get ('userInfo')){		gam.InitPage (obj);	}	else {		ffwait = function () {WaitGAMToInit11 (obj, dialogPage,uPk);};		setTimeout ("ffwait ()", 10);	};};function ActivateDbManager (ta) {	var ifrmObj = window.frames.length > 0? window.frames [0] : null;	var ready = ifrmObj != null;		if (ready) {			ifrmObj ["UserDefinedProcessTableAdded"] = function (t) {				t.SubscribeForEvent (5, "ColClicked", window);				t.SubscribeForEvent (6, "TblClicked", window);			};			ifrmObj ["ColClicked"] = function (t, sr, c){										ta.focus ();										if (isIE ()){											var tempText = document.selection.createRange();											tempText.text = t.tableName + "." + c;																				}										else{											ta.value = ta.value + t.tableName + "." + c;										};									 };			ifrmObj ["TblClicked"] = function (t){										ta.focus ();										if (isIE ()){											var tempText = document.selection.createRange();											tempText.text = t.tableName;										}										else{											ta.value = ta.value + t.tableName;										};									 };		}		else {			ff$ff11=function () {ActivateDbManager (ta);};			setTimeout ("ff$ff11", 100);		};		if (!ready){		ff$ff11=function () {ActivateDbManager (ta);};		setTimeout ("ff$ff11", 100);	};};var IabDDManEvent = {	DragStart : 1000};function IabDDMan () {		inheritClass (CommonParentForEvents, this);	this.objArr = [];		var thisPointer = this;	this.IabSHandler =  function () {var se = event.srcElement; if (se.tagName != "INPUT" && se.tagName != "TEXTAREA") { event.returnValue=false;return false;}};	this.IabMDHandler = function (evnt) {thisPointer.DDHandleMouseDown (evnt); };		this.IabMMHandler = function (evnt) {thisPointer.DDHandleMouseMove (evnt); };	this.IabMUHandler = function (evnt) {thisPointer.DDHandleMouseUp (evnt); };	this.IabMMIdleHandler = function (evnt) {thisPointer.DDHandleIdleMouseMove (evnt); };	this.releaseHandlers=false;	this.mD = false;	if (typeof (this.constructor.prototype.PrototypeFinishedIabDDMan) == 'undefined') {					this.constructor.prototype.Start=Start;				this.constructor.prototype.DDHandleMouseDown=DDHandleMouseDown;				this.constructor.prototype.DDHandleMouseMove=DDHandleMouseMove;				this.constructor.prototype.DDHandleIdleMouseMove=DDHandleIdleMouseMove;				this.constructor.prototype.DDHandleMouseUp=DDHandleMouseUp;						this.constructor.prototype.PrototypeFinishedIabDDMan=true;		};		this.constructor.prototype.GetUGam=function (){			var uf = null;		try{			uf = top.window.frames["upper"];		}		catch (e){};				if (uf){			var gam = uf.gamObj;			return (gam ? gam : null);		};	};	this.constructor.prototype.GetIabControl=function (srcElement){			if (!srcElement.getAttribute) return null;				while (true){					if (!srcElement.getAttribute) return null;						var ii=srcElement.getAttribute ("iabinit");			if (ii != null && ii != "" && srcElement.getAttribute) return GetIabControl (srcElement.getAttribute ("id"));						srcElement = srcElement.parentNode;						if (!srcElement) return null;		};			};		this.constructor.prototype.GetIabControlSource=function (srcElement){			if (!srcElement.getAttribute) return null;				while (true){					if (!srcElement.getAttribute) return null;						var ii=srcElement.getAttribute ("iabinit");			if (ii != null && ii != "" && srcElement.getAttribute) return srcElement;						srcElement = srcElement.parentNode;						if (!srcElement) return null;		};			};			this.constructor.prototype.Stop=function (){		var obj = document.body;				if (isNN ()){							obj.removeEventListener ("mousedown", this.IabMDHandler, true);							obj.removeEventListener ("mousemove", this.IabMMIdleHandler, true);						}					else {							obj.detachEvent ("onselectstart", this.IabSHandler);							obj.detachEvent ("onmousedown", this.IabMDHandler);							obj.detachEvent ("onmousemove", this.IabMMIdleHandler);						};						};	function Start () {				var thisPointer = this;										var obj = document.body;				if (isNN ()){							obj.addEventListener ("mousedown", this.IabMDHandler, true);							obj.addEventListener ("mousemove", this.IabMMIdleHandler, true);						}					else {							obj.attachEvent ("onselectstart", this.IabSHandler);							obj.attachEvent ("onmousedown", this.IabMDHandler);							obj.attachEvent ("onmousemove", this.IabMMIdleHandler);						};						};				function DDHandleMouseDown (evnt) {				this.mD = true;		var srcElement = getEventObject (evnt) ;				var eO = getEventObj (evnt) ;						if (eO.preventDefault && srcElement.tagName != "INPUT" && srcElement.tagName != "TEXTAREA" && srcElement.tagName != "SELECT") {			eO.preventDefault();		};		this.mdX=eO.clientX;		this.mdY=eO.clientY;		var ic = this.GetIabControl (srcElement);		if (!ic) return;		var ic1 = this.GetIabControlSource (srcElement);		this.ic=ic;		this.ic1=ic1;						/*ask this control if it supports dnd*/		var startDnD = ic.supportDnD;		if (!startDnD) return;		var ic2 = ic1.getAttribute ("DragStart");        if (ic2){			/*hack for NN*/			if (!isIE ()){				var tp = ic1.getAttribute ("iabinit");				if (tp == "12"){					var tvItem = GetAttributeAnywhere (srcElement,"TVI_ID");					ic.ProcessClick (tvItem,null,evnt);				};			};			var eventName = StripParenthesis (ic2);			var retNow = eval (eventName) (ic);			if (retNow != 1) return;		};			if (srcElement.componentFromPoint){			var sst = srcElement.componentFromPoint (eO.clientX, eO.clientY);			if (sst.substring (0, 6) == "scroll" || sst.substring (0, 6) == "handle") return;		};	/*				var DnDObj = document.createElement ("DIV");		DnDObj.innerHTML=ic.GetDndCursor ();		DnDObj.style.position="absolute";		DnDObj.style.top=eO.clientY + 10;		DnDObj.style.left=eO.clientX  + 10;				document.body.appendChild (DnDObj);				if (DnDObj){						DnDObj.style.zIndex = get$$$MaxZIndex () + 1;						this.___MV___ = DnDObj;								var uf = this.GetUGam ();			if (uf){				uf.Register ("IAB_DND_MO", DnDObj);				uf.Register ("IAB_DND_MO_W", window);			};					};			var eventHandlers = ic.GetEventHandlers (IabDDManEvent.DragStart); 		for (var i in eventHandlers){						eval (i) (this, srcElement); 				};					*/		var thisPtr=this;		ff$ff12_67_21=function (){			var obj = document.body;			if (isNN ()){								obj.addEventListener ("mousemove", thisPtr.IabMMHandler, true);				obj.addEventListener ("mouseup", thisPtr.IabMUHandler, true);							if (obj.parentNode){					obj.parentNode.parentNode.addEventListener ("mousemove", thisPtr.IabMMHandler, true);									obj.parentNode.parentNode.addEventListener ("mouseup", thisPtr.IabMUHandler, true);							};							}						else {								obj.attachEvent ("onmousemove", thisPtr.IabMMHandler);								obj.attachEvent ("onmouseup", thisPtr.IabMUHandler);						};							};				ff$ff12_67_21();			};			function DDHandleMouseUp (evnt,justR) {				this.mD = false;		var jR = arguments.length == 2;		var thisPtr=this;		if (isIE()){						var obj = document.body;			if (isNN ()){								obj.removeEventListener ("mousemove", thisPtr.IabMMHandler, true);				obj.removeEventListener ("mouseup", thisPtr.IabMUHandler, true);								if (obj.parentNode){					obj.parentNode.parentNode.removeEventListener ("mousemove", thisPtr.IabMMHandler, true);									obj.parentNode.parentNode.removeEventListener ("mouseup", thisPtr.IabMUHandler, true);							};							}						else {								obj.detachEvent ("onmousemove", thisPtr.IabMMHandler);								obj.detachEvent ("onmouseup", thisPtr.IabMUHandler);						};							};				if (!this.___MV___) return;		var uf = this.GetUGam ();		if (uf){			uf.Unregister ("IAB_DND_MO");			uf.Unregister ("IAB_DND_MO_W");		};		var ic = this.ic1;		var ic1 = this.ic;		var ic3 = ic.getAttribute ("iabinit");		this.___MV___.parentNode.removeChild (this.___MV___);		this.___MV___OldCX = null;				this.___MV___OldCY = null;				this.___MV___ = null;				if (!jR){			var srcElement = getEventObject (evnt);					var ic10 = this.GetIabControl (srcElement);			var ic11 = this.GetIabControlSource (srcElement);	        if (!ic11 || !ic10) return;			var ic2 = ic11.getAttribute ("DragEnd");	        if (!ic2) return;			var eventName = StripParenthesis (ic2);			eval (eventName) (ic1, ic3, ic10);		};			this.ic = null;		this.ic1 = null;		this.ic2 = null;		this.ic3 = null;	};			function DDHandleMouseMove (evnt) {						if (this.___MV___){						var evObj = getEventObj (evnt);									this.___MV___.style.left = evObj.clientX + 10;						this.___MV___.style.top = evObj.clientY + 10;								}		else if (this.mD){			var eO = getEventObj (evnt) ;					var ic = this.ic;			if (this.mdX==eO.clientX && this.mdY==eO.clientY) return;			var DnDObj = document.createElement ("DIV");			DnDObj.innerHTML=ic.GetDndCursor ();			DnDObj.style.position="absolute";			DnDObj.style.top=eO.clientY + 10;			DnDObj.style.left=eO.clientX  + 10;					document.body.appendChild (DnDObj);					if (DnDObj){							DnDObj.style.zIndex = get$$$MaxZIndex () + 1;							this.___MV___ = DnDObj;									var uf = this.GetUGam ();				if (uf){					uf.Register ("IAB_DND_MO", DnDObj);					uf.Register ("IAB_DND_MO_W", window);				};						};				var eventHandlers = ic.GetEventHandlers (IabDDManEvent.DragStart); 			for (var i in eventHandlers){							eval (i) (this, srcElement); 					};						};		};	function DDHandleIdleMouseMove (evnt) {						if (!this.___MV___){						var eO = null;			try{				eO=getEventObj (evnt);			}			catch(e){				return;			};			var ch = eO.button;						var uf = this.GetUGam ();			if (!uf) return;						var oMO = uf.Get ("IAB_DND_MO");			var w = uf.Get ("IAB_DND_MO_W");						if (oMO){				/*remove old cursor*/				var dndObjiH=w.iab_nddm_12321.___MV___.innerHTML;				this.ic = w.iab_nddm_12321.ic;				this.ic1 = w.iab_nddm_12321.ic1;				w.iab_nddm_12321.DDHandleMouseUp (evnt, true);				var btn=ch == 1;				if (!btn && isIE ()) {					return;				};							var DnDObj = document.createElement ("DIV");				DnDObj.innerHTML=dndObjiH;				DnDObj.style.position="absolute";				DnDObj.style.top=eO.clientY + 10;				DnDObj.style.left=eO.clientX  + 10;				document.body.appendChild (DnDObj);				DnDObj.style.zIndex = get$$$MaxZIndex () + 1;								this.___MV___ = DnDObj;				var uf = this.GetUGam ();				if (uf){					uf.Register ("IAB_DND_MO", DnDObj);					uf.Register ("IAB_DND_MO_W", window);				};								var thisPtr=this;				ff$ff12_67_21=function (){					var obj = document.body;					if (isNN ()){												obj.addEventListener ("mousemove", thisPtr.IabMMHandler, true);						obj.addEventListener ("mouseup", thisPtr.IabMUHandler, true);											if (obj.parentNode){							obj.parentNode.parentNode.addEventListener ("mousemove", thisPtr.IabMMHandler, true);											obj.parentNode.parentNode.addEventListener ("mouseup", thisPtr.IabMUHandler, true);									};											}								else {										obj.attachEvent ("onmousemove", thisPtr.IabMMHandler);										obj.attachEvent ("onmouseup", thisPtr.IabMUHandler);								};									};								ff$ff12_67_21();			};		};		};};
