/*Object.prototype.extend = function(key,value){
				this[key] = value;
				return this;//return object so function can be chained.
			};
Object.prototype.trace = function(){
		if(window.console){
			console.log("Trace:" + this);
		}
		return this;
	};*/
var _trace = function(str){
		if(window.console){
			console.log("Trace:" + str);
		}
	};
if(typeof CV=="undefined"||!CV){var CV={}}if(typeof CV.util=="undefined"||!CV.util){CV.util={}}if(typeof CV.WIDGET=="undefined"||!CV.WIDGET){CV.WIDGET={}}CV.util.getElement=function(a){if(a&&typeof a=="string"){return document.getElementById(a)}else{return a}};CV.util.getElementByClassName=function(f,h,b){var j=h||"*";var g=(b)?CV.util.getElement(b):null||document;var a=g.getElementsByTagName(j);var e=a.length;var c=[];for(var d=0;d<e;d++){if(a[d].className==f){c[c.length]=a[d]}}return c};CV.util.getChildren=function(b){var a=[];var c=b.firstChild;while(c){if(c.nodeType==1){a.push(c)}c=c.nextSibling}return a};CV.util.setOptions=function(c,b){if(!b){return}for(var a in b){if(b[a]===undefined){continue}c[a]=b[a]}};CV.util.setCssClass=function(b,a){var c=CV.util.getElement(b);c.className=a};CV.util.setInnerHtml=function(a,d){if(!a){return}var c=CV.util.getElement(a);var b="<script[^>]*>(.|s|\n|\r)*?<\/script>";c.innerHTML=d.replace(new RegExp(b,"img"),"")};CV.util.addEventListener=function(b,a,c){try{if(b.addEventListener){b.addEventListener(a,c,false)}else{if(b.attachEvent){b.attachEvent("on"+a,c)}}}catch(d){}};CV.BrowserSniff=function(){var c=navigator.appName.toString();var a=navigator.platform.toString();var f=navigator.userAgent.toString();this.mozilla=this.ie=this.opera=r=false;var i=/Opera.([0-9\.]*)/i;var e=/MSIE.([0-9\.]*)/i;var h=/gecko/i;var g=/safari\/([\d\.]*)/i;if(f.match(i)){r=f.match(i);this.opera=true;this.version=parseFloat(r[1])}else{if(f.match(e)){r=f.match(e);this.ie=true;this.version=parseFloat(r[1])}else{if(f.match(g)){this.safari=true;this.version=1.4}else{if(f.match(h)){var d=/rv:\s*([0-9\.]+)/i;r=f.match(d);this.mozilla=true;this.version=parseFloat(r[1])}}}}this.windows=this.mac=this.linux=false;this.Platform=f.match(/windows/i)?"windows":(f.match(/linux/i)?"linux":(f.match(/mac/i)?"mac":f.match(/unix/i)?"unix":"unknown"));this[this.Platform]=true;this.v=this.version;if(this.safari&&this.mac&&this.mozilla){this.mozilla=false}};CV.is=new CV.BrowserSniff();CV.util.getViewPortSize=function(){var a={x:0,y:0};if(typeof window.innerWidth!="undefined"){a.x=window.innerWidth}else{if(typeof document.documentElement!="undefined"&&typeof document.documentElement.clientWidth!="undefined"&&document.documentElement.clientWidth!=0){a.x=document.documentElement.clientWidth}else{a.x=document.getElementsByTagName("body")[0].clientWidth}}if(typeof window.innerWidth!="undefined"){a.y=window.innerHeight}else{if(typeof document.documentElement!="undefined"&&typeof document.documentElement.clientWidth!="undefined"&&document.documentElement.clientWidth!=0){a.y=document.documentElement.clientHeight}else{a.y=document.getElementsByTagName("body")[0].clientHeight}}return a};CV.util.getMouseXY=function(a){var b={x:0,y:0};if(a.pageX){b.x=a.pageX}else{if(a.clientX){b.x=a.clientX+(document.documentElement.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft)}}if(isNaN(b.x)){b.x=0}if(a.pageY){b.y=a.pageY}else{if(a.clientY){b.y=a.clientY+(document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop)}}if(isNaN(b.y)){b.y=0}return b};CV.util.getElementSize=function(b){var a={x:0,y:0};a.x=b.offsetWidth;a.y=b.offsetHeight;return a};CV.util.httpRequest=function(b,d,a,c){this.url=b;this.callback=d;this.init=function(){this.req=CV.util.httpRequest.createXMLHTTPObject();this.method=(a)?"POST":"GET";this.postData=(a)?a:null};this.init();CV.util.setOptions(this.req,c);this.open=function(){this.req.open(this.method,this.url,true);this.req.setRequestHeader("User-Agent","XMLHTTP/1.0");if(a){this.req.setRequestHeader("Content-type","application/x-www-form-urlencoded")}var e=this.req;var f=this.callback;this.req.onreadystatechange=function(){if(e.readyState!=4){return}if(e.status!=200&&e.status!=304){return}f(e)};if(e.readyState==4){return}e.send(this.postData)}};CV.util.httpRequest.requestObjectBuilder=[function(){return new XMLHttpRequest()},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}];CV.util.httpRequest.createXMLHTTPObject=function(){var c=false;for(var a=0;a<CV.util.httpRequest.requestObjectBuilder.length;a++){try{c=CV.util.httpRequest.requestObjectBuilder[a]()}catch(b){continue}break}return c};CV.util.cookie={set:function(c,d,e){if(e){var b=new Date();b.setTime(b.getTime()+(e*24*60*60*1000));var a="; expires="+b.toGMTString()}else{var a=""}document.cookie=c+"="+d+a+"; path=/"},read:function(b){var e=b+"=";var a=document.cookie.split(";");for(var d=0;d<a.length;d++){var f=a[d];while(f.charAt(0)==" "){f=f.substring(1,f.length)}if(f.indexOf(e)==0){return f.substring(e.length,f.length)}}return null},remove:function(a){createCookie(a,"",-1)}};function removeWhiteSpace(a){a=this!=window?this:a;return a.replace(/\s*/g,"")}String.prototype.nows=removeWhiteSpace;

