//<script>
String.prototype.Contains=function(A){return (this.indexOf(A)>-1);};
var s=navigator.userAgent.toLowerCase();
var Co_BrowserInfo={IsIE:s.Contains('msie'),IsIE7:s.Contains('msie 7'),IsGecko:s.Contains('gecko/'),IsSafari:s.Contains('safari'),IsOpera:s.Contains('opera'),IsMac:s.Contains('macintosh')};
(function(A){A.IsGeckoLike=(A.IsGecko||A.IsSafari||A.IsOpera);if (A.IsGecko){var B=s.match(/gecko\/(\d+)/)[1];A.IsGecko10=B<20051111;}else A.IsGecko10=false;})(Co_BrowserInfo);
var Co_Tools={}
Co_Tools.GetWindowScroll=function(win){if(!win)win=window;var x=0,y=0;
  if(typeof(win.pageYOffset)=='number'){y=win.pageYOffset;x=win.pageXOffset;}
	else if(win.document.body&&(win.document.body.scrollLeft||win.document.body.scrollTop)){y=win.document.body.scrollTop;x=win.document.body.scrollLeft;}
	else if(win.document.documentElement&&(win.document.documentElement.scrollLeft||win.document.documentElement.scrollTop)){y=win.document.documentElement.scrollTop;x=win.document.documentElement.scrollLeft;}
  return [x,y];
};
Co_Tools.GetWindowScrollX=function(win){return this.GetWindowScroll(win)[0];};
Co_Tools.GetWindowScrollY=function(win){return this.GetWindowScroll(win)[1];};
Co_Tools.GetWindowDimensions=function(win){if(!win)win=window;var w=0,h=0;
  if(typeof(win.innerWidth)=='number') {w=win.innerWidth;h=win.innerHeight;}
	else if(win.document.documentElement && (win.document.documentElement.clientWidth||win.document.documentElement.clientHeight)) {w=win.document.documentElement.clientWidth;h=win.document.documentElement.clientHeight;}
	else if(win.document.body&&(win.document.body.clientWidth||win.document.body.clientHeight)){w=win.document.body.clientWidth;h=win.document.body.clientHeight;}
	return [w,h];
};
Co_Tools.GetWindowWidth=function(win){return this.GetWindowDimensions(win)[0];};
Co_Tools.GetWindowHeight=function(win){return this.GetWindowDimensions(win)[1];};
Co_Tools.GetObjectPosition=function(o){var t=l=0;if(!o.offsetParent)return [l,t];t=o.offsetTop;l=o.offsetLeft;while(o=o.offsetParent){if ((o.parentNode.align=="center"&&o.nodeName=="DIV" && o.id != "cdo_fullwrap"))continue;t+=o.offsetTop;l+=o.offsetLeft;};return [l,t];}
Co_Tools.GetObjectPositionX=function(o){return this.GetObjectPosition(o)[0];};
Co_Tools.GetObjectPositionY=function(o){return this.GetObjectPosition(o)[1];};
Co_Tools.AttachEvent=function(sourceObject, eventName, listener){if (Co_BrowserInfo.IsIE) {sourceObject.attachEvent('on'+eventName, listener);}else {sourceObject.addEventListener(eventName, listener, false);}}
/* These events cannot yet be detached */
Co_Tools.AddEventListenerEx=Co_Tools.AddEventListener=function(sourceObject, eventName, listener, paramsArray, targetObject ){if (Co_BrowserInfo.IsIE) {var o=new Object();o.Source=targetObject||sourceObject;o.Params=paramsArray||[];/*Memory leak if we have DOM objects here.*/o.Listener=function(ev){return listener.apply(o.Source,[ev].concat(o.Params));};sourceObject.attachEvent('on'+eventName,o.Listener);sourceObject=null;paramsArray=null;}else {sourceObject.addEventListener(eventName,function(e){listener.apply(targetObject||sourceObject,[e].concat(paramsArray||[]));},false);};}
Co_Tools.RemoveEventListenerEx=function(sourceObject, eventName, listener) {}
Co_Tools.RemoveEventListener=Co_Tools.DetachEvent=function(sourceObject,eventName,listener){if(Co_BrowserInfo.IsIE){sourceObject.detachEvent('on'+eventName,listener);}else{sourceObject.removeEventListener(eventName,listener,false);}} 
Co_Tools.RunFunction=function(func,thisObject,paramsArray,timerWindow){if(func)this.SetTimeout(func,0,thisObject,paramsArray,timerWindow);}
Co_Tools.SetTimeout=function(func,milliseconds,thisObject,paramsArray,timerWindow){return (timerWindow||window).setTimeout(function(){if(paramsArray)func.apply(thisObject,[].concat(paramsArray));else func.apply(thisObject);},milliseconds);}
Co_Tools.SetInterval=function(func,milliseconds,thisObject,paramsArray,timerWindow){return (timerWindow||window).setInterval(function(){if(paramsArray)func.apply(thisObject,[].concat(paramsArray));else func.apply(thisObject);},milliseconds);}
Co_Tools.GetSelectedRadioIndex=Co_Tools.getSelectedRadioIndex=function(o){if (!typeof(o.length)=="undefined"){if (o.checked) return 0;};var i,ol;for (i=0,ol=o.length;i<ol;i++)if(o[i].checked)return i;return -1;}
Co_Tools.GetSelectedRadioItem=Co_Tools.getSelectedRadioItem=function(o){var idx=this.getSelectedRadioIndex(o);if(idx>=0)return o[idx];else return null;}
Co_Tools.ToggleSelect_if_IE=function(b_visible,ignore_objects){var s_visible=(b_visible?"visible":"hidden");if(typeof(ignore_objects)=="undefined")ignore_objects=false;if (!document.getElementsByTagName) return;if (Co_BrowserInfo.IsIE){if(!document.all)return;var o=document.getElementsByTagName("SELECT");for(var i=0;i<o.length;i++)o[i].style.visibility=s_visible;if(ignore_objects)return;var o=document.getElementsByTagName("OBJECT");for(var i=0;i<o.length;i++)o[i].style.visibility=s_visible;} else if(!ignore_objects) {var o=document.getElementsByTagName("OBJECT");for(var i=0;i<o.length;i++)o[i].style.visibility=s_visible;}}
Co_Tools.getChildElementById=Co_Tools.getChildElementByID=function(s_id, node){
	var ret;var nl=node.childNodes.length;if(nl==0)return null;
	for(var i=0;i<nl;i++){
		if(i==0)node=node.firstChild;
		else node=node.nextSibling;
		if(node==null)return null;
		if(node.nodeName.toLowerCase()=="#text")continue;
		if(node.id.toLowerCase()==s_id.toLowerCase()){return node;}
		else if (node.childNodes.length>0){ret=this.getChildElementById(s_id,node);}
		if(ret)return ret;
	};return null;
};
Co_Tools.formatCurrency=Co_Tools.FormatCurrency=function(n,symbol){if(!symbol)symbol="$";n=n.toString().replace(/\$|\,/g,'');dblValue=parseFloat(n);blnSign=(dblValue==(dblValue=Math.abs(dblValue)));dblValue=Math.floor(dblValue*100+0.50000000001);intCents=dblValue%100;strCents=intCents.toString();dblValue=Math.floor(dblValue/100).toString();if(intCents<10)strCents="0"+strCents;for(var i=0;i<Math.floor((dblValue.length-(1+i))/3);i++)dblValue=dblValue.substring(0,dblValue.length-(4*i+3))+','+dblValue.substring(dblValue.length-(4*i+3));return (((blnSign)?'':'-')+symbol+dblValue+'.'+strCents);}
//</script>