var dataTools=new dataTools(); // Add an extends - function to the objects // so that we have proper inheritance Object.prototype.extends = function (oSuper) { for (sProperty in oSuper) { this[sProperty] = oSuper[sProperty]; } } function dataTools(){ var m_pkey=0; this.getNewPKey=getNewPKey; this.setPKey=setPKey; this.urlArgs=new urlArgs(); this.getCookie=getCookie; this.setCookie=setCookie; this.imageDom=imageDom; function getNewPKey(){ return(m_pkey++); } function setPKey(inPKey){ m_pkey=inPKey; } function urlArgs(){ var m_allPairs=window.location.search.substring(1).split("&"); this.getValueByKey=getValueByKey; function getValueByKey(key){ for (var i=0;i