function Tipmage (id,isEditable) { Tipmage.prototype._tooltipHorDist = 10; Tipmage.prototype._tooltipVerDist = 10; Tipmage.prototype._cornerWidth = 8;				Tipmage.prototype._cornerHeight = 8; Tipmage.prototype._rectModWidth = 50; Tipmage.prototype._rectModHeight = 50; Tipmage.prototype._hideTimeout = 400; Tipmage.prototype._hideInitialTimeout = 2000;	this.imageId = id; this.isEditable = isEditable; this.tooltipNextId = 1; this.modNumId = 0; this.mouseOverNumId = 0; this.isMoving = 0; this.overContainer = 0;}Tipmage.prototype = { 'startup' : function () { var image = this.getEl(this.imageId);var myself = this; var tmContainer = myself.createElement('div','tmContainer','tmContainer');tmContainer.style.display = 'block';tmContainer.style.padding = '0px';tmContainer.style.margin = '0px';tmContainer.style.clear = 'both';	var father = image.parentNode;var siblings = father.childNodes;	for (i=0; i<siblings.length; i++) {if (siblings[i].id==this.imageId) {father.replaceChild(tmContainer,siblings[i]);break;}}var tmTooltips = myself.createElement('div','tmTooltips','tmTooltips');tmTooltips.style.position = 'absolute';tmTooltips.style.textAlign = 'left';tmContainer.appendChild(tmTooltips);tmContainer.appendChild(image);myself.addLoadEvent(function() {tmContainer.style.width = myself.num2size(image.width);tmContainer.style.height = myself.num2size(image.height);tmTooltips.style.width = myself.num2size(image.width);tmTooltips.style.height = myself.num2size(image.height);});tmContainer.onmouseover = function (e) {if (!myself.isMoving) {myself.overContainer = 1;tmTooltips.style.visibility = 'visible';}};tmContainer.onmouseout = function (e) {if (!myself.isMoving) {myself.overContainer = 0;tmTooltips.style.visibility = 'hidden';}};setTimeout(function(){if (!myself.overContainer) {tmTooltips.style.visibility = 'hidden';}},myself._hideInitialTimeout);if (this.isEditable) {var tmRectMod = myself.createElement('div','tmRectMod','tmRectMod');tmRectMod.style.position = 'absolute';tmRectMod.style.zIndex = '180';tmRectMod.style.left = '0px';tmRectMod.style.top = '0px';tmRectMod.style.width = myself.num2size(myself._rectModWidth);tmRectMod.style.height = myself.num2size(myself._rectModHeight);tmRectMod.style.visibility = 'hidden';myself.modNumId = 0;tmTooltips.appendChild(tmRectMod); var tmRectContrastMod = myself.createElement('div','tmRectContrastMod','tmRectContrastMod');tmRectContrastMod.style.position = 'absolute';tmRectContrastMod.style.zIndex = '181';tmRectContrastMod.style.width = '100%';tmRectContrastMod.style.height = '100%';tmRectMod.appendChild(tmRectContrastMod);var tmRectInsideMod = myself.createElement('div','tmRectInsideMod','tmRectInsideMod');tmRectInsideMod.style.position = 'absolute';tmRectInsideMod.style.zIndex = '190';tmRectInsideMod.style.width = '100%';tmRectInsideMod.style.height = '100%';tmRectInsideMod.style.cursor = 'move';tmRectInsideMod.style.background = '#FFF';tmRectInsideMod.style.opacity = '0';tmRectInsideMod.style.filter = 'alpha(opacity=0)'; tmRectMod.appendChild(tmRectInsideMod);var tmRectEtiq = myself.createElement('div','tmRectEtiq','tmRectEtiq');tmRectEtiq.style.position = 'absolute';tmRectEtiq.style.zIndex = '181';tmRectEtiq.style.left = '10px';tmRectEtiq.style.top = '10px';tmTooltips.appendChild(tmRectEtiq);var tmButtonEtiq = myself.createElement('input','tmButton','tmButtonEtiq');tmButtonEtiq.type = 'button';tmButtonEtiq.value = 'Etiquetar';tmRectEtiq.appendChild(tmButtonEtiq);var tmTooltipMod = myself.createElement('div','tmTooltipMod','tmTooltipMod');tmTooltipMod.style.position = 'absolute';tmTooltipMod.style.zIndex = '140';tmTooltipMod.style.left = myself.num2size(50+myself._tooltipHorDist);tmTooltipMod.style.top = myself.num2size(50+myself._tooltipVerDist);tmTooltipMod.style.width = '195px';tmTooltipMod.style.visibility = 'hidden';tmTooltips.appendChild(tmTooltipMod);var tmTextSearch = myself.createElement('span','tmSearch','tmSearch');tmTextSearch.innerHTML = '<span class="miLinkSearch">&laquo;- Etiquetar un usuario</span> <span class="arrobaSearch">@ </span><span id="tmCountResult"></span><div id="UserSearchDinamic">Buscar por <b>usuario</b> o <b>apellido</b>:<br><input type="text" onkeydown="searchUsMind(this.value);" onkeyup="searchUsMind(this.value);" id="tmTextBuscar"><br>O bien <b>seleccione</b> de la <b>lista</b>:</div><div id="UserDinamicScroll"><img src="boximg.gif" onload="loadListUs();"></div><div id="UserSearchDinamicFdo"></div><div id="UserMindDinamic" style="display:none;"></div>';tmTooltipMod.appendChild(tmTextSearch);var tmForm = myself.createElement('form','tmForm','tmForm');tmForm.style.zIndex = '160';tmTooltipMod.appendChild(tmForm); var tmTextArea = myself.createElement('textArea','tmTextArea','tmTextArea');tmTextArea.style.zIndex = '170';tmTextArea.onkeydown = function(e) {contarArea('tmForm','tmTextArea',document.getElementById('limitDescLabel').value,'tmCountResult');};tmTextArea.onkeyup = function(e) {contarArea('tmForm','tmTextArea',document.getElementById('limitDescLabel').value,'tmCountResult');};tmForm.appendChild(tmTextArea);var tmButtonSave = myself.createElement('input','tmButton','tmButtonSave');tmButtonSave.type = 'button';tmButtonSave.value = 'Guardar';tmForm.appendChild(tmButtonSave);var tmButtonCancel = myself.createElement('input','tmButton','tmButtonCancel');tmButtonCancel.type = 'button';tmButtonCancel.value = 'Cancelar';tmForm.appendChild(tmButtonCancel);var tmButtonDelete = myself.createElement('input','tmButton','tmButtonDelete');tmButtonDelete.type = 'button';tmButtonDelete.value = 'Eliminar';tmForm.appendChild(tmButtonDelete);tmCornerNW = myself.createCorner('nw');tmRectMod.appendChild(tmCornerNW);tmCornerNE = myself.createCorner('ne');tmRectMod.appendChild(tmCornerNE);tmCornerSE = myself.createCorner('se');tmRectMod.appendChild(tmCornerSE);tmCornerSW = myself.createCorner('sw');tmRectMod.appendChild(tmCornerSW);tmRectInsideMod.onmousedown = function(e) {myself.disableSelect();myself.isMoving = 1;var rectStartX = myself.size2num(tmRectMod.style.left);var rectStartY = myself.size2num(tmRectMod.style.top);var cursorStart = myself.getCursorPosition(e);tmTooltipMod.style.visibility = 'hidden';if (window.event) {window.event.cancelBubble = true;window.event.returnValue = false;}if (e && e.preventDefault) {e.preventDefault();}document.onmouseup = function(e) {myself.isMoving = 0;myself.enableSelect();document.onmousemove = null;document.onmouseup = null;myself.showTooltipMod();};document.onmousemove = function(e) {var cursorNow = myself.getCursorPosition(e);var imageSize = myself.getImageSize();var left = cursorNow[0] - cursorStart[0] + rectStartX;var top = cursorNow[1] - cursorStart[1] + rectStartY;if (left >= 0 && left <= imageSize[0] - myself.size2num(tmRectMod.style.width)) {tmRectMod.style.left = myself.num2size(left);}if (top >= 0 && top <= imageSize[1] - myself.size2num(tmRectMod.style.height)) {tmRectMod.style.top = myself.num2size(top);}};};tmButtonSave.onclick = function(e) { var izq = myself.size2num(tmRectMod.style.left);var top = myself.size2num(tmRectMod.style.top);var anc = myself.size2num(tmRectMod.style.width);var alt = myself.size2num(tmRectMod.style.height);var txt = tmTextArea.value;$.post("ajaxa.php",{AjxDescLabel:txt,AjxListUs2:document.getElementById('identUsPerfil').value}, function(data){if(data=='ok'){if (myself.modNumId==myself.tooltipNextId) { $.post("ajaxa.php",{AjxDescSSH:1,IDE:'x',idima:document.getElementById('sec_ghostImage').value,reg:document.getElementById('sec_ghostFolder').value,para:document.getElementById('identUsPerfil').value,posx:izq,posy:top,width:anc,height:alt,text:txt}, function(data){var med = data.split("@"); if(med[0]=='ok'){ myself.stopEditMode('save',med[1],med[2]); }});} else {var ide = myself.getEl('tmImputID'+myself.modNumId).value;$.post("ajaxa.php",{AjxDescSSH:2,IDE:ide,idima:document.getElementById('sec_ghostImage').value,reg:document.getElementById('sec_ghostFolder').value,para:document.getElementById('identUsPerfil').value,posx:izq,posy:top,width:anc,height:alt,text:txt}, function(data){ var med = data.split("@");if(med[0]=='ok'){myself.stopEditMode('save',ide,med[1]);} else {alert(data);}});}} else {alert(data);}})};tmButtonCancel.onclick = function (e) {myself.stopEditMode('cancel',0);};tmButtonDelete.onclick = function (e) {var ide = myself.getEl('tmImputID'+myself.modNumId).value;$.post("ajaxa.php",{AjxDescSSH:3,IDE:ide,idima:document.getElementById('sec_ghostImage').value,reg:document.getElementById('sec_ghostFolder').value,para:document.getElementById('identUsPerfil').value}, function(data){if(data=='ok'){myself.stopEditMode('delete',0,0);} else {alert(data);}});};tmButtonEtiq.onclick = function (e) {var target = myself.getEventTarget(myself.getEvent(e));if (target.id=='tmButtonEtiq' && !myself.isLocked()) {myself.startEditMode(e);}};}},'setTooltip' : function (name,IDE,estado,posx,posy,width,height,text,dplx,identifier) {var myself = this;var tooltips = myself.getEl('tmTooltips');if (identifier) {var numId = identifier;if (myself.tooltipNextId < identifier) {myself.tooltipNextId = identifier;}} else {var numId = myself.tooltipNextId;}var tmRect = myself.createElement('div','tmRect','tmRect'+numId);tmRect.style.position = 'absolute';tmRect.style.zIndex = '120';tmRect.style.left = myself.num2size(posx);tmRect.style.top = myself.num2size(posy);tmRect.style.width = myself.num2size(width);tmRect.style.height = myself.num2size(height);tooltips.appendChild(tmRect);var tmRectContrast = myself.createElement('div','tmRectContrast','tmRectContrast'+numId);tmRectContrast.style.position = 'absolute';tmRectContrast.style.zIndex = '121';tmRectContrast.style.width = '100%';tmRectContrast.style.height = '100%';tmRect.appendChild(tmRectContrast);var tmRectInside = myself.createElement('div','tmRectInside','tmRectInside'+numId);tmRectInside.style.position = 'absolute';tmRectInside.style.zIndex = '130';tmRectInside.style.width = '100%';tmRectInside.style.height = '100%';tmRectInside.style.background = '#FFF';tmRectInside.style.opacity = '0';tmRectInside.style.filter = 'alpha(opacity=0)';tmRect.appendChild(tmRectInside);var tmTooltip = myself.createElement('div','tmTooltip','tmTooltip'+numId);tmTooltip.style.position = 'absolute';tmTooltip.style.zIndex = '140';tmTooltip.style.left = myself.num2size(posx+width-5+myself._tooltipHorDist);tmTooltip.style.top = myself.num2size(posy);tmTooltip.style.width = myself.num2size(myself.calculateWidth(text));tmTooltip.style.visibility = 'hidden';tooltips.appendChild(tmTooltip);
var tmTooltipBy = myself.createElement('div','tmTooltipBy','tmTooltipBy'+numId);tmTooltipBy.style.position = 'absolute';tmTooltipBy.style.zIndex = '140';tmTooltipBy.style.left = myself.num2size(posx-20);tmTooltipBy.style.top = myself.num2size(posy-26);tmTooltipBy.style.width = myself.num2size(myself.calculateWidth(text)+width+15+myself._tooltipHorDist);tmTooltipBy.style.visibility = 'hidden';tooltips.appendChild(tmTooltipBy);var tmTextBy = myself.createElement('div','tmTextBy','tmTextBy'+numId);tmTextBy.style.zIndex = '150';tmTextBy.innerHTML = name;tmTooltipBy.appendChild(tmTextBy);document.getElementById('idConcatInnerHTML').innerHTML=document.getElementById('idConcatInnerHTML').innerHTML+'<input type="hidden" value="'+IDE+'" id="tmImputID'+numId+'">';var tmText = myself.createElement('p','tmText','tmText'+numId);tmText.style.zIndex = '150';$.post("ajaxa.php",{AjxDescFind:text,est:estado},function(data){tmText.innerHTML = data;});tmTooltip.appendChild(tmText);tmRectInside.onmouseover = function(e) {if (myself.isLocked()) {return;}myself.mouseOverNumId = numId;tmRect.className='tmRectSelected';tmRectContrast.className='tmRectContrastSelected';tmRectContrast.style.height = tmRect.style.height;tmTooltip.style.visibility = 'visible';tmTooltipBy.style.visibility = 'visible';myself.hideTooltipsExcept(numId);};tmRectInside.onmouseout = function(e) {if (myself.isLocked()) {return;}myself.mouseOverNumId = 0;myself.hideTooltip(numId);};if (myself.isEditable) {tmRectInside.onclick = function(e) {if (myself.isLocked()) {return;}if(dplx=='e'){myself.startEditMode(e);}};}tmTooltip.onmouseover = function(e) {if (myself.isLocked()) {return;}myself.mouseOverNumId = numId;};tmTooltip.onmouseout = function(e) {if (myself.isLocked()) {return;}myself.mouseOverNumId = 0;myself.hideTooltip(numId);};tmTooltipBy.onmouseover = function(e) {if (myself.isLocked()) {return;}myself.mouseOverNumId = numId;};tmTooltipBy.onmouseout = function(e) {if (myself.isLocked()) {return;}myself.mouseOverNumId = 0;myself.hideTooltip(numId);};myself.tooltipNextId = numId+1;return numId;},'hideTooltip' : function (numId) {var myself = this;setTimeout(function(){if (myself.mouseOverNumId==numId) return;myself.getEl('tmTooltip'+numId).style.visibility = 'hidden';myself.getEl('tmTooltipBy'+numId).style.visibility = 'hidden';var tmRect = myself.getEl('tmRect'+numId);tmRect.className='tmRect';var tmRectContrast = myself.getEl('tmRectContrast'+numId);tmRectContrast.className='tmRectContrast';tmRectContrast.style.height = tmRect.style.height;},myself._hideTimeout);},'hideTooltipsExcept' : function (numId) {var myself = this;var lastId = myself.tooltipNextId - 1;var elem = null;for (i=1; i<=lastId; i++) {var tmRect = myself.getEl('tmRect'+i);if (tmRect!=null) {if (i != numId) {tmRect.className = 'tmRect';var tmRectContrast = myself.getEl('tmRectContrast'+i);tmRectContrast.className = 'tmRectContrast';tmRectContrast.style.height = tmRect.style.height;myself.getEl('tmTooltip'+i).style.visibility = 'hidden';myself.getEl('tmTooltipBy'+i).style.visibility = 'hidden';}}}},'showTooltipMod' : function () {var myself = this;var tmTooltipMod = myself.getEl('tmTooltipMod');var tmRectMod = myself.getEl('tmRectMod');var tmTextArea = myself.getEl('tmTextArea');tmTooltipMod.style.left = myself.num2size(myself.size2num(tmRectMod.style.left));tmTooltipMod.style.top = myself.num2size(myself.size2num(tmRectMod.style.top) + myself.size2num(tmRectMod.style.height) + myself._tooltipVerDist);tmTooltipMod.style.visibility = 'visible';},'createCorner' : function (name) {var myself = this;var corner = myself.createElement('div','tmCorner','tmCorner'+name.toUpperCase());corner.style.position = 'absolute';corner.style.width = myself.num2size(myself._cornerWidth);corner.style.height = myself.num2size(myself._cornerHeight);corner.style.zIndex = '200';corner.style.fontSize = '1px';corner.style.overflow = 'hidden';corner.style.cursor = name+'-resize';if (name.charAt(0)=='n') {corner.style.top='-1px';}if (name.charAt(0)=='s') {corner.style.bottom='-1px';}if (name.charAt(1)=='w') {corner.style.left='-1px';}if (name.charAt(1)=='e') {corner.style.right='-1px';}corner.onmousedown = function(e) {myself.disableSelect();myself.isMoving = 1;var tmRectMod = myself.getEl('tmRectMod');var tmRectInsideMod = myself.getEl('tmRectInsideMod');var tmRectContrastMod = myself.getEl('tmRectContrastMod');var tmTooltipMod = myself.getEl('tmTooltipMod');var rectStartX = myself.size2num(tmRectMod.style.left);var rectStartY = myself.size2num(tmRectMod.style.top);var rectStartWidth = myself.size2num(tmRectMod.style.width);var rectStartHeight = myself.size2num(tmRectMod.style.height);var cursorStart = myself.getCursorPosition(e);tmTooltipMod.style.visibility = 'hidden';if (window.event) {window.event.cancelBubble = true;window.event.returnValue = false;}if (e && e.preventDefault) {e.preventDefault();}document.onmouseup = function(e) {myself.isMoving = 0;myself.enableSelect();document.onmousemove = null;document.onmouseup = null;myself.showTooltipMod();};document.onmousemove = function(e) {var cursorNow = myself.getCursorPosition(e);var imageSize = myself.getImageSize();var offsetX = cursorNow[0] - cursorStart[0];var offsetY = cursorNow[1] - cursorStart[1];if (name.charAt(0)=='n') {if (offsetY + rectStartY >= 0 && rectStartHeight - offsetY >= (myself._cornerHeight*2)) {tmRectMod.style.top = myself.num2size(offsetY + rectStartY);tmRectMod.style.height = myself.num2size(rectStartHeight - offsetY);}}if (name.charAt(0)=='s') {if (offsetY + rectStartY + rectStartHeight <= imageSize[1] && rectStartHeight + offsetY >= (myself._cornerHeight*2)) {tmRectMod.style.height = myself.num2size(rectStartHeight + offsetY);}}if (name.charAt(1)=='w') {if (offsetX + rectStartX >= 0 && rectStartWidth - offsetX >= (myself._cornerWidth*2)) {tmRectMod.style.left = myself.num2size(offsetX + rectStartX);tmRectMod.style.width = myself.num2size(rectStartWidth - offsetX);}}if (name.charAt(1)=='e') {if (offsetX + rectStartX + rectStartWidth <= imageSize[0] && rectStartWidth + offsetX >= (myself._cornerWidth*2)) {tmRectMod.style.width = myself.num2size(rectStartWidth + offsetX);}}};};return corner;},'startEditMode' : function (e) {var evt = this.getEvent(e);var target = this.getEventTarget(evt);var myself = this;var tmRectMod = myself.getEl('tmRectMod');var tmRectContrastMod = myself.getEl('tmRectContrastMod');var tmRectInsideMod = myself.getEl('tmRectInsideMod');var tmTextArea = myself.getEl('tmTextArea');tmTextArea.value = '';myself.mouseOverNumId = 0;if ((target.id=='tmTooltips' || target.id=='tmButtonEtiq' || target.id==this.imageId) && evt.type=='click') {myself.modNumId = myself.tooltipNextId;var pos = myself.getCursorPosition(evt);var size = myself.getImageSize();var tmContainer = myself.getEl('tmContainer');var offsetLeft = myself.getTotalOffsetLeft(tmContainer);var offsetTop = myself.getTotalOffsetTop(tmContainer);tmRectMod.style.left = '70px';tmRectMod.style.top = '50px';tmRectMod.style.width = '70px';tmRectMod.style.height = '70px';myself.getEl('tmButtonDelete').style.visibility = 'hidden';} else {var numId = target.id.split('tmRectInside').join('');var tmRect = myself.getEl('tmRect'+numId);var tmTooltip = myself.getEl('tmTooltip'+numId);var tmTooltipBy = myself.getEl('tmTooltipBy'+numId);var tmText = myself.getEl('tmText'+numId);var ide = myself.getEl('tmImputID'+numId).value;myself.modNumId = numId;tmRect.style.visibility = 'hidden';tmTooltip.style.visibility = 'hidden';tmTooltipBy.style.visibility = 'hidden';tmRectMod.style.left = tmRect.style.left;tmRectMod.style.top = tmRect.style.top;tmRectMod.style.width = tmRect.style.width;tmRectMod.style.height = tmRect.style.height;$.post("ajaxa.php",{AjxDescFind:document.getElementById('sec_ghostImage').value+'%'+ide,est:0},function(data){tmTextArea.value = myself.br2nl(data);});myself.getEl('tmButtonDelete').style.visibility = '';}tmRectMod.style.visibility = 'visible';myself.showTooltipMod();},'stopEditMode' : function (action,ide,name) {var myself = this;var tmRectMod = myself.getEl('tmRectMod');var tmTooltipMod = myself.getEl('tmTooltipMod');var tmTextArea = myself.getEl('tmTextArea');if (myself.modNumId==myself.tooltipNextId && action=='save') {myself.setTooltip(name,ide,2,myself.size2num(tmRectMod.style.left),myself.size2num(tmRectMod.style.top),myself.size2num(tmRectMod.style.width),myself.size2num(tmRectMod.style.height),Base64.encode(tmTextArea.value),'e');}var tmRect = myself.getEl('tmRect'+myself.modNumId);var tmRectContrast = myself.getEl('tmRectContrast'+myself.modNumId);var tmRectInside = myself.getEl('tmRectInside'+myself.modNumId);var tmTooltip = myself.getEl('tmTooltip'+myself.modNumId);var tmTooltipBy = myself.getEl('tmTooltipBy'+myself.modNumId);var tmText = myself.getEl('tmText'+myself.modNumId);var tmTextBy = myself.getEl('tmTextBy'+myself.modNumId);tmRectMod.style.visibility = 'hidden';tmTooltipMod.style.visibility = 'hidden';if (myself.modNumId==myself.tooltipNextId && action=='save') { tmRect.style.visibility = '';tmTooltip.style.visibility = '';tmTooltipBy.style.visibility = '';myself.hideTooltip(myself.modNumId);} else { if (action=='cancel') {if(tmRect){tmRect.style.visibility = '';tmTooltip.style.visibility = '';myself.hideTooltip(myself.modNumId);}} else if (action=='delete') {var tmTooltips = myself.getEl('tmTooltips');tmTooltips.removeChild(tmRect);tmTooltips.removeChild(tmTooltip);tmTooltips.removeChild(tmTooltipBy);} else { tmRect.style.left = tmRectMod.style.left ;tmRect.style.top = tmRectMod.style.top;tmRect.style.width = tmRectMod.style.width;tmRect.style.height = tmRectMod.style.height;tmRectContrast.style.width = tmRectMod.style.width;tmRectContrast.style.height = tmRectMod.style.height;var posx = myself.size2num(tmRect.style.left);var width = myself.size2num(tmRect.style.width);var posy = myself.size2num(tmRect.style.top);tmTooltip.style.left = myself.num2size(posx+width-5+myself._tooltipHorDist);tmTooltip.style.top = myself.num2size(posy);tmTooltipBy.style.left = myself.num2size(posx-20);tmTooltipBy.style.top = myself.num2size(posy-26);$.post("ajaxa.php",{AjxDescFind:Base64.encode(tmTextArea.value),est:2},function(data){tmText.innerHTML = data;tmTextBy.innerHTML = name;var q = tmText.innerHTML;var sanear = q.replace(/\<[^\>]*\>/ig,'');tmTooltip.style.width = myself.num2size(myself.calculateWidth(sanear));tmTooltipBy.style.width = myself.num2size(myself.calculateWidth(sanear)+width+15+myself._tooltipHorDist);});tmRect.style.visibility = '';tmTooltip.style.visibility = '';tmTooltipBy.style.visibility = '';myself.hideTooltip(myself.modNumId);}};myself.modNumId = 0;},'isLocked' : function() {var myself = this;if (!this.isEditable || this.modNumId==0) {return false;} else {return true;}},'size2num' : function (string) {return parseInt(string.split('px').join(''));},'num2size' : function (num) {return num+'px';},'calculateWidth' : function (text) {if (text.length>100) {return 250;} else {if (text.length>40) {return 200;} else {return 125;}}},'getCursorPosition' : function (e) {var pos = new Array();if (window.scrollX || window.scrollX==0) {pos[0] = e.clientX + window.scrollX;pos[1] = e.clientY + window.scrollY;} else {if (window.event.clientX) {pos[0] = window.event.clientX + document.documentElement.scrollLeft + document.body.scrollLeft;pos[1] = window.event.clientY + document.documentElement.scrollTop + document.body.scrollTop;} else {pos = null;}}return pos;},'getTotalOffsetLeft' : function (elem) {if (elem.offsetParent) {return elem.offsetLeft + this.getTotalOffsetLeft(elem.offsetParent);} else {return elem.offsetLeft;}},'getTotalOffsetTop' : function (elem) {if (elem.offsetParent) {return elem.offsetTop + this.getTotalOffsetTop(elem.offsetParent);} else {return elem.offsetTop;}},'getImageSize' : function (e) {var myself = this;var size = new Array();var image = myself.getEl(myself.imageId);size[0] = image.width;size[1] = image.height;return size;},'getEvent' : function (e) {if(e) {return e;} else if (window.event) {return window.event;}return null;},'getEventTarget' : function (e) {if (e.target) {return e.target;}if (e.srcElement) {return e.srcElement;}return null;},'nl2br' : function (text) {return text.replace(/\n/ig,'<br>');},'br2nl' : function (text) {return text.replace(/<br>/ig,'\n');},'addLoadEvent' : function (func) {var oldonload = window.onload;if (typeof window.onload != 'function') {window.onload = func;} else {window.onload = function() {oldonload();func();}}},'disableSelect' : function () {document.onselectstart=new Function("return false");},'enableSelect' : function () {document.onselectstart=new Function("return true");},'getEl' : function (id) {if (document.getElementById) {return document.getElementById(id);} else if (document.all) {return document.all[id];}return null;},'createElement' : function (type,className,id) {var elem = document.createElement(type);elem.className = className;elem.id = id;return elem;}};
