
//------------------------- Start Phone2 Validator ---------------------------->
var n_2;
var p_2;
var p11_2;
function ValidatePhone2()
{
	p_2=p11_2.value
	if(p_2.length==3)
	{
		pp_2=p_2;
		d4_2=p_2.indexOf('(')
		d5_2=p_2.indexOf(')')
		if(d4_2==-1)
		{
			pp_2="("+pp_2;
		}
		if(d5_2==-1)
		{
			pp_2=pp_2+")";
		}
	document.formreg.Phone2.value="";
	document.formreg.Phone2.value=pp_2;
	}
if(p_2.length>3)
{
	d1_2=p_2.indexOf('(')
	d2_2=p_2.indexOf(')')
	if (d2_2==-1)
	{
		l30_2=p_2.length;
		p30_2=p_2.substring(0,4);
		p30_2=p30_2+")"
		p31_2=p_2.substring(4,l30_2);
		pp_2=p30_2+p31_2;
		document.formreg.Phone2.value="";
		document.formreg.Phone2.value=pp_2;
	}
}
if(p_2.length>5)
{
	p11_2=p_2.substring(d1_2+1,d2_2);
	if(p11_2.length>3)
	{
		p12_2=p11_2;
		l12_2=p12_2.length;
		l15_2=p_2.length
		p13_2=p11_2.substring(0,3);
		p14_2=p11_2.substring(3,l12_2);
		p15_2=p_2.substring(d2_2+1,l15_2);
		document.formreg.Phone2.value="";
		pp_2="("+p13_2+")"+p14_2+p15_2;
		document.formreg.Phone2.value=pp_2;
	}
	l16_2=p_2.length;
	p16_2=p_2.substring(d2_2+1,l16_2);
	l17_2=p16_2.length;
	if(l17_2>3&&p16_2.indexOf('-')==-1)
	{
		p17_2=p_2.substring(d2_2+1,d2_2+4);
		p18_2=p_2.substring(d2_2+4,l16_2);
		p19_2=p_2.substring(0,d2_2+1);
	pp_2=p19_2+p17_2+"-"+p18_2;
	document.formreg.Phone2.value="";
	document.formreg.Phone2.value=pp_2;
	}
}
//}
setTimeout(ValidatePhone2,100)
}
function getIt_2(m_2)
{
	n_2=m_2.name;
	p11_2=m_2
	ValidatePhone2()
}
function testphone_2(obj1_2)
{
	alert(obj1_2);
	p_2=obj1_2.value
	p_2=p_2.replace("(","")
	p_2=p_2.replace(")","")
	p_2=p_2.replace("-","")
	p_2=p_2.replace("-","")
	if (isNaN(p_2)==true)
	{
		alert("Check phone");
		return false;
	}
}
//-----------------------------------------  End Phone2 Validator ---------------------------------------->



startList = function() {

	// code for IE
	if(!document.body.currentStyle) return;
	var subs = document.getElementsByName('submenu');
	for(var i=0; i<subs.length; i++) {
		var li = subs[i].parentNode;
		if(li && li.lastChild.style) {
			li.onmouseover = function() {
				this.lastChild.style.visibility = 'visible';
			}
			li.onmouseout = function() {
				this.lastChild.style.visibility = 'hidden';
			}
		}
	}
}
window.onload=startList;

//----------------------------------------------------------------------//

