var userAgent = navigator.userAgent.toLowerCase();

Firefox = (userAgent.indexOf('firefox')!=-1);

Opera = (userAgent.indexOf('opera')!=-1);

Safari = (userAgent.indexOf('safari')!=-1);

Chrome = (userAgent.indexOf('chrome')!=-1);

IE = (userAgent.indexOf('msie')!=-1);

IE8 = (userAgent.indexOf('msie 8')!=-1);

IE7 = (userAgent.indexOf('msie 7')!=-1);

IE6 = (userAgent.indexOf('msie 6')!=-1);



var flashInstalled = false;





function getLeft(obj)

{

	return ((obj.tagName != "BODY") && (obj.tagName != "HTML"))?(obj.offsetLeft+getLeft(obj.offsetParent) ):0;

}



function getTop(obj)

{

	return ((obj.tagName != "BODY") && (obj.tagName != "HTML"))?(obj.offsetTop+getTop(obj.offsetParent) ):0;

}



function isChild(child, parent)

{

	if (!child) return false;

	if (!child.parentNode) return false;

	return ((child.parentNode == parent)||(child == parent))?(true):isChild(child.parentNode, parent);

}



function _parseFloat(s){

	return parseFloat(s);

}



function inputDefaultValue (jqo){

	jqo.each( function(){

		if (($(this).attr("type") == "submit") || ($(this).attr("type") == "button") || (!this.value)) return;

		this.defaultVal = this.value;

		$(this)
		.bind("focus", function(E){ 
			$(this).addClass("filled");
				if (this.defaultVal==this.value) {
					this.value = "";
				}
				
		})
		.bind("blur", function(E){ 
			if ( (this.value == "") || (this.defaultVal==this.value)) {
				this.value = this.defaultVal; $(this).removeClass("filled")
			} 
			else $(this).addClass("filled");
			
		});

	});

}



function onFormDVSubmit(){

	var inp = $(":input");

	inp.each( function(){

		if (this.defaultVal == this.value) this.value = "";	

	});

}

	




