function setFocus(argElementId)
{
	document.getElementById(argElementId).focus();	
}


function doClear(field) 
{
	if (field.value == field.defaultValue) 
	{
	 	field.value = "";
	}
}
function resetField(field) 
{
	if (field.value == '') 
	{
		field.value = field.defaultValue;
	}
}

function insertKey(argForm, argField)
{
	myForm = document.forms[argForm];
	myForm[argField].value = 'aNtIsPaMkEy!!11';
}

function printPage() 
{
	window.print();  
}


function openPopup(argStrFile, argStrFrameName, argIntWidth, argIntHeight, argIntLeftStart, argIntTopStart, argIntScrollbars, argIntResizeable)
{
	if(argStrFrameName == '' || argStrFrameName == undefined)
	{
		argStrFrameName = 'popup';
	}
	if(argIntWidth == '' || argIntWidth == undefined)
	{
		argIntWidth = 530;
	}
	if(argIntHeight == '' || argIntHeight == undefined)
	{
		argIntHeight = 380;
	}
	if(argIntLeftStart == '' || argIntLeftStart == undefined)
	{
		argIntLeftStart = (screen.width/2) - (argIntWidth/2);
	}
	if(argIntTopStart == '' || argIntTopStart == undefined)
	{
		argIntTopStart = (screen.height/2) - (argIntHeight/2);
	}	
	if(argIntScrollbars == '' || argIntScrollbars == undefined)
	{
		argIntScrollbars = 'no';
	}
	if(argIntResizeable == '' || argIntResizeable == undefined)
	{
		argIntResizeable = 'no';
	}

	var strProperties = "width=" + argIntWidth + ", height=" + argIntHeight + ", left=" + argIntLeftStart + ", top=" + argIntTopStart + ", toolbar=no, titlebar=no, title=0, location=no, scrollbars=" + argIntScrollbars + ", status=no, resizable=" + argIntResizeable;
	
	window.open(argStrFile, argStrFrameName, strProperties);
}

function resellerCity(argUrl)
{
	strCity = document.getElementById('cities').options[document.getElementById('cities').selectedIndex].text.toLowerCase();
	window.location = argUrl + strCity;
}

function showResellers(argUrl)
{
	window.opener.location = argUrl;
  window.close();
}


