function Element(elementName,parentWindow,showErrors){this.name=elementName;this.parentWindow=parentWindow;this.showErrors=(showErrors!=null)?showErrors:false;this.obj=this.getElement();try{this.style=this.getElementStyle();}catch(e){(showErrors==true)?alert("Error occured when trying to acquire the style properties of: \""+elementName+"\""):void(0);this.style=null;}}function getBrowser(){var browser;if(document.all){browser="IE";}else if(document.getElementById){browser="W3C";}else if(document.layers){browser="NS4";}return browser;};Element.prototype.getElement=function(){var epre,epost;var obj;switch(getBrowser()){case "W3C":epre='document.getElementById("';epost='")';break;case "NS4":epre='document.';epost='';break;case "IE":epre='document.all.';epost='';break;}if(this.parentWindow==true){epre="opener."+epre;}try{obj=eval(epre+this.name+epost);if(obj==null){throw("Invalid Reference");}}catch(e){(this.showErrors)?alert(e.description+" :\""+this.name+"\""):void(0);obj=eval('document.getElementById("'+this.name+'")');}return obj;};Element.prototype.getElementStyle=function(){var spre,spost;var obj;switch(getBrowser()){case "W3C":spre='document.getElementById("';spost='").style';break;case "NS4":spre='document.';spost='';break;case "IE":spre='document.all.';spost='.style';break;}try{obj=eval(spre+this.name+spost);if(obj==null){throw("Invalid Reference");}}catch(e){(this.showErrors)?alert(e.description+" :\""+this.name+"\""):void(0);obj=eval('document.getElementById("'+this.name+'").style');}return obj;};Element.prototype.getX=function(){return this.style.left;};Element.prototype.getY=function(){return this.style.top;};Element.prototype.moveTo=function(x,y){this.style.left=x;this.style.top=y;};Element.prototype.getUnit=function(strUnit){var unit;unit=strUnit.substr((strUnit.length)-2,2);return unit;};Element.prototype.moveBy=function(x,y){var oldx,oldy,unitList,strReplace;var count;oldx=this.getX();oldy=this.getY();rExp=eval("/"+this.getUnit(oldx)+"/gi");oldx=Number(oldx.replace(rExp,""));rExp=eval("/"+this.getUnit(oldy)+"/gi");oldy=Number(oldy.replace(rExp,""));this.style.left=oldx+x;this.style.top=oldy+y;};Element.prototype.changePositionType=function(newType){this.style.position=newType;};Element.prototype.changeVisible=function(status){this.style.visibility=status;};Element.prototype.changeDisplay=function(status){this.style.display=status;};Element.prototype.changeBackgroundColor=function(color){this.style.backgroundColor=color;};Element.prototype.changeBackgroundImage=function(imageSrc){this.style.backgroundImage=imageSrc;};