/**
 ** __format_phone
 ** __ie_png_fix
 ** __submit_contact_form
 **/
 
function __format_phone(string,target)
{	
	string = string.replace(/[^\d]/g,'');	
	if (string.length > 0)
	{		
		phone = '';		
		if (string.length >= 3)
			phone += '(' + string.substr(0,3) + ')';
		
		if (string.length > 3 && string.length >= 6)
			phone += ' ' + string.substr(3,3);
		
		if (string.length > 6 && string.length >= 10)
			phone += '-' + string.substr(6,4);
		
		if (string.length > 10)
			phone += ' ext. ' + string.substr(10,(string.length)-1);
		
		target.value = phone;
	}				
}


function __ie6_png_fix()
{
	if ($.browser.msie)
	{
		if (parseInt($.browser.version) <= 6)
			$(document).pngFix();
	}
}

function __submit_contact_form()
{
	var form = document.forms['form'];
	
	if (form)
	{
		form['mode'].value = 'submit';
		$('input:button',form).attr('disabled','disabled');
		form.submit();
	}
}

$(document).ready
(
	function()
	{
		__ie6_png_fix();	
	}
);