function openWindow(URL)
{
	newWindow = window.open(URL, "newWindow", "toolbar=yes,location=yes,scrollbars=yes,width=450,height=400,left=100,top=100");
	newWindow.focus();
}
// ------------------------------
function openLargeWindow(URL)
{
	newWindow = window.open(URL, "newWindow","toolbar=yes,location=yes,scrollbars=yes,resizable=yes,width=600,height=400,left=100,top=10");
	newWindow.focus();
}
// ------------------------------

function submitIt()
	{
		if (!validateTextbox (document.login.sitename, "The site name you entered is invalid."))
		return false;		
		else 
		loadpage();
	}
	
//----------------------------------------------------------
function validateTextbox(textbox, message)
{
var sitename = textbox.value

	 if (sitename == "")
	{
		displayError(textbox, "Please enter your site name.");			// display the error message passed in	
		return false;						// return an error condition
	}				
	else if ((sitename == "americanpoolconstruction") || (sitename == "landerurology") || (sitename == "smallbusinesssolutionsnetwork") || (sitename == "wiseguytalk") || (sitename == "fitnessnbalance") || (sitename == "ourcatholickids") || (sitename == "computerconsultants")|| (sitename == "family"))// if this particular textbox is empty
	 	return true;						// return a success condition
						// if textbox is NOT empty
	else	
	{
		displayError(textbox, message);			// display the error message passed in	
		return false;						// return an error condition
	}										// if textbox is NOT empty
		
}
//----------------------------------------------------------
function loadpage()
	{
				newwin = window.open("http://www.eyesbryte.com/" + document.login.sitename.value + "/index.html", "newWindow","toolbar=yes,location=yes,scrollbars=yes,resizable=yes,width=600,height=400,left=100,top=10")  
				newWindow.focus();
	}
	//-------------------------------------------------------------->

function displayError(textbox, message)

{
		alert(message);				// display the error message passed in
		textbox.select();			// select this textbox
		textbox.focus();			// and set the focus there
		return false;
}
//----------------------------------------------------------------

function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}


