<!--
function popupWindow(url,windowType, windowName) 
{
	Top = window.screenTop + 5;
	Left = window.screenLeft + 5;
	if (windowType == 'MainEdit')
	{
		attributestring = "width=800,height=600,top=" + Top + ",left=" + Left + ",toolbar=no,menubar=no,scrollbars=yes,resizable=yes,status=yes,location=no,directories=no,copyhistory=no,alwaysRaised=yes";
	}
	else if (windowType == 'SmallEdit')
	{
		attributestring = "width=522,height=450,top=" + Top + ",left=" + Left + ",toolbar=no,menubar=no,scrollbars=yes,resizable=yes,status=yes,location=no,directories=no,copyhistory=no,alwaysRaised=yes";
	}
	else if (windowType == 'SendPopUp')
	{
		attributestring = "width=400,height=380,top=" + Top + ",left=" + Left + ",toolbar=no,menubar=no,scrollbars=yes,resizable=yes,status=yes,location=no,directories=no,copyhistory=no,alwaysRaised=yes";
	}
	else if (windowType == 'SelectSearch')
	{
		attributestring = "width=450,height=312,top=" + Top + ",left=" + Left + ",toolbar=no,menubar=no,scrollbars=yes,resizable=yes,status=yes,location=no,directories=no,copyhistory=no,alwaysRaised=yes";
	}
	else if (windowType == 'Calendar')
	{
		attributestring = "width=233,height=197,top=" + Top + ",left=" + Left + ",toolbar=no,menubar=no,scrollbars=no,resizable=no,status=no,location=no,directories=no,copyhistory=no,alwaysRaised=yes";
	}
	else if (windowType == 'Full')
	{
		attributestring = "width=800,height=600,top=" + Top + ",left=" + Left + ",toolbar=no,menubar=no,scrollbars=yes,resizable=yes,status=yes,location=no,directories=no,copyhistory=no,alwaysRaised=yes";
	}
	else if (windowType == 'Map')
	{
	    attributestring = "width=620,height=550,top=" + Top + ",left=" + Left + ",toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no";
	}
	else if (windowType == 'AddMap')
	{
	    attributestring = "width=620,height=550,top=" + Top + ",left=" + Left + ",toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no";
	}
	else if (windowType == 'Photos')
	{
	    attributestring = "width=500,height=500,top=" + Top + ",left=" + Left + ",toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes";
	}
	else if (windowType == 'Menus')
	{
	    attributestring = "width=600,height=500,top=" + Top + ",left=" + Left + ",toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes";
	}

	myWindow = window.open(url + "&isPopUp=true",windowName,attributestring);
	
}

function goNewWin(url,windowname) 
{
var Top = window.screenTop + 25;
var Left = window.screenLeft + 25;
var NewWinHeight=400;
var NewWinWidth=600;
var NewWinPutX=10;
var NewWinPutY=10;
TheNewWin = window.open(url,windowname,'top=' + Top + ',left=' + Left + ',width=600,height=400,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no'); 
TheNewWin.resizeTo(NewWinHeight,NewWinWidth);
TheNewWin.moveTo(NewWinPutX,NewWinPutY);
}

function goNewWinMap(url,windowname) 
{
alert('ok');
var Top = window.screenTop + 25;
var Left = window.screenLeft + 25;
var NewWinHeight=400;
var NewWinWidth=600;
var NewWinPutX=mouseX(event);
var NewWinPutY=mouseY(event);
TheNewWin = window.open(url,windowname,'width=600,height=400,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no'); 

}

function goNewWinAddMap(url,windowname) 
{
TheNewWin = window.open(url,windowname,'width=620,height=600,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no'); 
}


function CloseAndRefresh(args)
{	
	if (window.opener.document.forms[0].btnSearch)
		window.opener.document.forms[0].btnSearch.click();
	else
		window.opener.document.forms[0].submit();
	window.close();
}



//Used mainly to hide and show Panels... (div and span elements)
function ChangeVisiblility(anchorTag, panelName, hiddenFieldName)
{
	var y = document.getElementById(panelName);
	var img = anchorTag.children[0];
	var hf = document.getElementById(hiddenFieldName);
	if (y.style.display == 'none')
	{
		y.style.display = 'inline';
		img.src = "/Media/Section_Collapse.gif";
		hf.value = 1;
	}
	else
	{
		y.style.display = 'none';
		img.src = "/Media/Section_Expand.gif";
		hf.value = 0;
	}
}

function InitialVisibility(anchorTag, panelName, hiddenFieldName)
{
	var hf = document.getElementById(hiddenFieldName);
	var img = anchorTag.children[0];
	var y = document.getElementById(panelName);
	if (hf.value == "0")
	{
		y.style.display = 'none';
		img.src = "/Media/Section_Expand.gif";
	}
	else
	{
		y.style.display = 'inline';
		img.src = "/Media/Section_Collapse.gif";
	}
}

function formatPhone(x)
{
	var pstr = stripPhone(x.value);
	if (pstr.length == 10 && !isNaN(pstr))
	{
		x.value = "(" + pstr.substr(0,3) + ")" + pstr.substr(3,3) + "-" + pstr.substr(6);
	}
}

function stripPhone(str)
{
	str=str.replace("(","");
	str=str.replace(")","");
	str=str.replace("-","");
	str=str.replace("-","");
	str=str.replace(".","");
	str=str.replace(".","");
	str=str.replace(" ","");
	str=str.replace(" ","");
	str=str.replace(" ","");
	return str;
}


function CallBackFunction(radWindow, returnValue) 
{

var oValue = returnValue.substring(0,returnValue.indexOf(':'));
var oValue2 = returnValue.substring(returnValue.indexOf(':')+1,returnValue.indexOf(';'));
var oValue3 = returnValue.substring(returnValue.indexOf(';')+1,returnValue.indexOf('*'));
var namefield = returnValue.substring(returnValue.indexOf('*')+1,returnValue.indexOf('^'));
var valuefield = returnValue.substring(returnValue.indexOf('^')+1,returnValue.length);
var oArea = document.getElementById(namefield);
if (oValue) oArea.value = oValue;
var oArea = document.getElementById(valuefield);
if (oValue2) oArea.value = oValue2;
if (oValue3 == 'true')window.document.forms[0].submit();

}

//-->
