//to randomize style sheet
function GetRandomCSS() {
		var cssList = new Array (
								'css/transparency1.css',
								'css/transparency2.css',
								'css/transparency3.css',
								'css/transparency4.css',
								'css/transparency5.css');
		var randnum = Math.floor (cssList.length * Math.random ());
		return cssList [randnum];
}
//to change style sheet
function changeCSS () {
	document.getElementById('cssHolder').setAttribute(
		'href',
		GetRandomCSS ());
}

//to insert date							
	now=new Date;
	
	date = now.getDate();
	
	month = now.getMonth();
	if (month == 0){month = "January"}
	if (month == 1){month = "February"}
	if (month == 2){month = "March"}
	if (month == 3){month = "April"}
	if (month == 4){month = "May"}
	if (month == 5){month = "June"}
	if (month == 6){month = "July"}
	if (month == 7){month = "August"}
	if (month == 8){month = "September"}
	if (month == 9){month = "October"}
	if (month == 10){month = "November"}
	if (month == 11){month = "December"}
	
	year = now.getYear();
	
	dayOfWeek = now.getDay();
	if (dayOfWeek == 0){dayOfWeek = "Sunday"}
	if (dayOfWeek == 1){dayOfWeek = "Monday"}
	if (dayOfWeek == 2){dayOfWeek = "Tuesday"}
	if (dayOfWeek == 3){dayOfWeek = "Eednesday"}
	if (dayOfWeek == 4){dayOfWeek = "Thursday"}
	if (dayOfWeek == 5){dayOfWeek = "Friday"}


// js for text inside textbox
function onClick_Text(tag,word)
{
	if (tag.value == word)
		tag.value = "";
}


//for signup.aspx
function SubmitForm()
{
	var alertStr;

	if (document.customerSignup1.dlID.value.length == 0)
	{
		alertStr = 'You must register your company with theinfocity.com before you can signup for the website builder.';
		alertStr = alertStr + '\n\n Please follow these steps to signup:';
		alertStr = alertStr + '\n\n 1.  Use the theinfocity.com search to see if your business is already registered in our directory.  If you find your business listing, simply click the SIGNUP NOW link next to your listing to return to this page and proceed with the signup process.';
		alertStr = alertStr + '\n\n 2.  If your business is not in our directory, click the register button above to add your business to our directory free of charge.  You will then be redirected to this page and you may then proceed with the signup process.';
		alert(alertStr);
		return false;
	}

	// Determine the paypalOption (ie, customerStatus) based on the trail period the user selected
	//if (document.customerSignup1.trialPeriod.selectedIndex == 0)
	//{
		// User selected no trial period, set customerStatus = 2
	//	document.customerSignup1.paypalOption.value = '2';
	//}
	//else
	//{
		// User selected a trial period, set customerStatus = 3
	//	document.customerSignup1.paypalOption.value = '3';
	//}
	
	document.customerSignup1.submit();
	return false;
}

function PaypalHelpWindow(page)
{
	var paypalHelpWindow, url;
	var left = 100, top = 100;
	
	if (document.all || document.layers) 
	{
		left = Math.round((screen.availWidth-530)/2);
		top	 = Math.round((screen.availHeight-400)/2);
	}

	url = 'http://www.theinfocity.com/paypal/' + page;
	
	paypalHelpWindow= window.open(url,"PaypalHelpWindow","height=400,width=530,scrollbars=1,resizable=0,menubar=0,location=0,toolbar=0,status=1,left="+left+",top="+top+",screenX="+left+",screenY="+top);
	if (paypalHelpWindow) 
	{
		paypalHelpWindow.focus();
	}
	
	return false;
}

function VisualTour()	
{
	var ypTourWindow;
	var left = 100, top = 100;
	
	if (document.all || document.layers) 
	{
		left = Math.round((screen.availWidth-500)/2);
		top = Math.round((screen.availHeight-346)/2);
	}

	ypTourWindow	= window.open("http://www.theinfocity.com/tour/step1.html","YPTourWindow","height=346,width=500,scrollbars=0,resizable=0,menubar=0,location=0,toolbar=0,status=1,left="+left+",top="+top+",screenX="+left+",screenY="+top);
	if (ypTourWindow) 
	{
		ypTourWindow.focus();
	}

	return false;
}




