var p_dlle = "abcdefghijklmnopqrstuvwxyz";
var dk_kle = "8410273695@-.";

function showText1()
{
	document.write(p_dlle.substring(3,4) + p_dlle.substring(0,1) + p_dlle.substring(21,22) +
					p_dlle.substring(4,5) + dk_kle.substring(10,11) + 
					p_dlle.substring(3,4) + p_dlle.substring(0,1) + p_dlle.substring(21,22) +
					p_dlle.substring(4,5) + p_dlle.substring(5,6) + p_dlle.substring(4,5) +
					p_dlle.substring(11,12) + p_dlle.substring(19,20) + p_dlle.substring(25,26) + 
					dk_kle.substring(12,13) + p_dlle.substring(2,3) + p_dlle.substring(14,15) + 
					p_dlle.substring(12,13));
}

function showText2()
{
	document.write(dk_kle.substring(6,7) + dk_kle.substring(2,3) + dk_kle.substring(5,6) + 
	dk_kle.substring(11,12) + dk_kle.substring(4,5) + dk_kle.substring(4,5) + 
	dk_kle.substring(9,10) + dk_kle.substring(11,12)  + dk_kle.substring(9,10) + 
	dk_kle.substring(1,2)  + dk_kle.substring(6,7) + dk_kle.substring(0,1));
}


function popUp(URL, w, h) 
{
	var centerWidth = (window.screen.width - w) / 2;
	
	newwindow = window.open(URL,'name','height = ' + h + ', width = ' + w + ',top = 100,left='+centerWidth);
	if (window.focus) 
		newwindow.focus();
}


function validateQuote()
{
	var pattern = /\w+@\w+\.\w+/;
	if(!pattern.exec(document.quote.email.value))
	{
		alert('A valid email address is required.');
		return false;
	}
	if(document.quote.contact.value == "")
	{
		alert('A contact name is required.');
		return false;
	}
	if(document.quote.brief.value == "")
	{
		alert('You must enter a brief description of the project.');
		return false;
	}
	if(document.quote.requirements.value == "")
	{
		alert('You must enter the requirements of the project.');
		return false;
	}
	if(document.quote.services.value == "")
	{
		alert('You must enter the service that you require of me.');
		return false;
	}
	if(document.quote.timetable.value == "")
	{
		alert('You must enter an estimated timetable for project completion');
		return false;
	}
	return true;
}


function validateContact()
{
	var pattern = /\w+@\w+\.\w+/;
	var pattern2 = /\w+@\w+\.\w+/;
	var phoneNumberPattern = /^\(?(\d{3})\)?[- ]?(\d{3})[- ]?(\d{4})$/;  
	
	if(!pattern.exec(document.quest.email.value))
	{
		alert('A valid email address is required.');
		return false;
	}
	if(document.quest.phone.value != "" && !phoneNumberPattern.exec(document.quest.phone.value))
	{
		alert('Phone number is not valid.');
		return false;
	}
	if(document.quest.Contact.value == "")
	{
		alert('A contact name is required.');
		return false;
	}
	if(document.quest.comments.value == "")
	{
		alert('You must enter some type of a comment.');
		return false;
	}
	return true;
}





