var preload3 = new Image();
preload3.src = '/images/form_left_contact.jpg';
var preload4 = new Image();
preload4.src = '/images/formfill.gif';

function switchToTab(name) {
	if(name == 'Info') {
		document.getElementById('tabPanelInfo').style.display = '';
		document.getElementById('tabPanelContact').style.display = 'none';
		document.getElementById('tabImageInfoActive').style.display = '';
		document.getElementById('tabImageInfoDeactive').style.display = 'none';
		document.getElementById('tabImageContactActive').style.display = 'none';
		document.getElementById('tabImageContactDeactive').style.display = '';
document.getElementById('tabPanelContainer').style.background = '';
		document.getElementById('tabPanelContainer').style.background = 'url(/images/form_left_info.jpg) no-repeat 0 0';

	}
	else {
		document.getElementById('tabPanelInfo').style.display = 'none';
		document.getElementById('tabPanelContact').style.display = '';
		document.getElementById('tabImageInfoActive').style.display = 'none';
		document.getElementById('tabImageInfoDeactive').style.display = '';
		document.getElementById('tabImageContactActive').style.display = '';
		document.getElementById('tabImageContactDeactive').style.display = 'none';
document.getElementById('tabPanelContainer').style.background = '';
		document.getElementById('tabPanelContainer').style.background = 'url(/images/form_left_contact.jpg) no-repeat 0 0';

	}
}

/** Used this code from http://homepage.ntlworld.com/bobosola/pnginfo.htm **/
var arVersion = navigator.appVersion.split("MSIE")
var version = parseFloat(arVersion[1])

function fixPNG(myImage) 
{
    if ((version >= 5.5) && (version < 7) && (document.body.filters)) 
    {
       var imgID = (myImage.id) ? "id='" + myImage.id + "' " : ""
	   var imgClass = (myImage.className) ? "class='" + myImage.className + "' " : ""
	   var imgTitle = (myImage.title) ? 
		             "title='" + myImage.title  + "' " : "title='" + myImage.alt + "' "
	   var imgStyle = "display:inline-block;" + myImage.style.cssText
	   var strNewHTML = "<span " + imgID + imgClass + imgTitle
                  + " style=\"" + "width:" + myImage.width 
                  + "px; height:" + myImage.height 
                  + "px;" + imgStyle + ";"
                  + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
                  + "(src=\'" + myImage.src + "\', sizingMethod='scale');\"></span>"
	   myImage.outerHTML = strNewHTML	  
    }
}

/**
 * The inheritance of the objects.
 */
	Object.prototype.inherit = function(superClass) {
		var tmpClass = function() {};
		tmpClass.prototype = superClass.prototype;
		this.prototype = new tmpClass;
		var className = superClass.getClassName();
		this.prototype[className] = superClass;
	}
	
	Object.prototype.getClassName = function() {
		return this.toString().match(/function\s*(\w+)/)[1];
	}
	
/**
 * Providing a way to easily add and remove class names from html elements.
 */
	String.prototype.trim = function() {
	    return this.replace( /^\s+|\s+$/, "" );
	}
	
	function addClassName(elem, className) {
		removeClassName (elem, className);
		elem.className = (elem.className + " " + className).trim();
	}
		
	function removeClassName(elem, className) {
		elem.className = elem.className.replace(className, "").trim();
	}

