var rochak = {
	lTrim:function(str){var r=/\s*((\S+\s*)*)/; return str.replace(r,"$1");},
	rTrim:function(str){var r=/((\s*\S+)*)\s*/;	return str.replace(r,"$1");},
	trim:function(str){return this.rTrim(this.lTrim(str));},
	isValidEmail:function(e){var p = /^[^@]+@[^@]+.[a-z]{2,}$/i;if(e.search(p)==-1){return false}else {return true;}},
	getType:function(o){var ob=o.constructor.toString();if(ob.charAt(0)=="["){ob=ob.replace("]","");return this.trim(ob.replace("[",""));}else{return this.trim(ob.substring(9,ob.indexOf("(")));}},
	inArray:function(a,b){if(this.getType(b)=="Array"){for(var i=0;i<b.length;i++){if(b[i]==a){return true;}}}return false;},
	inArrayI:function(a,b){if(this.getType(b)=="Array"){for(var i=0;i<b.length;i++){if(this.trim(b[i].toLowerCase())==this.trim(a.toLowerCase())){return true;}}}return false;},
	getMouseX:function(e){if(!e)e=window.event;if(e){if(e.pageX || e.pageY){return e.pageX;}else if(e.clientX || e.clientY){return (e.clientX+document.body.scrollLeft);}}return 0;},
	getMouseY:function(e){if(!e)e=window.event;if(e){if(e.pageX || e.pageY){return e.pageY;}else if(e.clientX || e.clientY){return (e.clientY+document.body.scrollTop);}}return 0;},
	getMouseXY:function(e){if(!e)e=window.event;if(e){if(e.pageX || e.pageY){var xPos=e.pageX;var yPos=e.pageY;}else if(e.clientX || e.clientY){var xPos=(e.clientX+document.body.scrollLeft);var yPos=(e.clientY+document.body.scrollTop);}}return Array(xPos,yPos);},
	getBrowserName:function(){return navigator.appName;},
	isBrowserIe:function(){ if(navigator.appName == 'Microsoft Internet Explorer'){return true;} else{ return false;}},
	isBrowserOpera:function(){ if(navigator.appName == 'Opera'){return true;} else{ return false;}},
	isBrowserNetscape:function(){ if(navigator.appName == 'Netscape'){return true;} else{ return false;}},
	getTotalImages:function(){return document.images.length;},
	explode:function(d,s){var a=new Array();var b='';var c=0;if(s.charAt(0)!=d){s[0]='';}for(var i=0;i<s.length;i++){b+=s.charAt(i);if(s.charAt(i)==d && b.replace(d,'').length>0){a[c]=b.replace(d,'');c++;b='';}if(i==(s.length-1) && b.replace(d,'').length>0){a[c]=b.replace(d,'');}} return a;},
	end:function(a){if(this.getType(a)=="String") {return a.charAt((a.length-1));} else if(this.getType(a)=="Array") { return a[a.length-1];} return this.getType(a);}
}