// Aniglyphics Media Hosting JavaScript Fucntions Document //

function popLiveHelp(){
	url = "http://www.aniglyphics.net/live/request_email.php?l=aniglyphics&x=1&deptid=2";
	newwindow=window.open(url,'LiveSupport','left=0,top=0');
	if (window.focus) {
		newwindow.focus();
	}
}

// Validate Contact Form //
function validateContact(contact)
	{
		if (contact.name.value == '')
		{
		    alert("Please Enter Your Name!");
		    contact.name.focus();
		    return false;
		}
		if (contact.telephone.value == '')
		{
		    alert("Please Enter Your Telephone Number!");
		    contact.telephone.focus();
		    return false;
		}
		if ((contact.email.value.indexOf('@') == -1) || (contact.email.value.indexOf('.') == -1))
		{
			alert("Please Enter Valid Email Address!");
			contact.email.focus();
			return false;
		}
		if (contact.details.value == '')
		{
		    alert("Please Provide Us With Some Information About Your Inquiry!");
		    contact.details.focus();
		    return false;
		}
		return true;		
	}
	// END Validate Contact Form //
	
<!-- Start Random Header Flash Piece -->	
function randomFlash()
{
	randomize = new Array();
	randomize[0] = "<OBJECT CLASSID='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' WIDTH='389' HEIGHT='129'><PARAM NAME='movie' VALUE='flash/premier-choice.swf'><PARAM NAME='menu' VALUE='false'><PARAM NAME='quality' VALUE='high'><EMBED SRC='flash/premier-choice.swf' QUALITY='high' WIDTH='389' HEIGHT='129'></EMBED></OBJECT>";
	randomize[1] = "<OBJECT CLASSID='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' WIDTH='389' HEIGHT='129'><PARAM NAME='movie' VALUE='flash/more-power.swf'><PARAM NAME='menu' VALUE='false'><PARAM NAME='quality' VALUE='high'><EMBED SRC='flash/more-power.swf' QUALITY='high' WIDTH='389' HEIGHT='129'></EMBED></OBJECT>";
	//randomize[2] = "<OBJECT CLASSID='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' WIDTH='389' HEIGHT='129'><PARAM NAME='movie' VALUE='flash/premier-choice.swf'><PARAM NAME='menu' VALUE='false'><PARAM NAME='quality' VALUE='high'><EMBED SRC='flash/premier-choice.swf' QUALITY='high' WIDTH='389' HEIGHT='129'></EMBED></OBJECT>";

	totalNum = randomize.length;
	
	random_num = Math.floor(Math.random() * totalNum);

	document.write(randomize[random_num]);
	
}
	// END Random Flash Display //

<!-- Start Validate Deciated Server Order Form -->
function validateDedicated(config)
	{
		osOption = -1;
		for (i=config.os.length-1; i > -1; i--) {
			if (config.os[i].checked) {
				osOption = i;
			}
		}
		if (osOption == -1) {
			alert("Please Select a Operating System");
			config.os[0].focus();
			return false;
		}
		cpOption = -1;
		for (i=config.controlPanel.length-1; i > -1; i--) {
			if (config.controlPanel[i].checked) {
				cpOption = i;
			}
		}
		if (cpOption == -1) {
			alert("Please Select a Control Panel Option");
			config.controlPanel[0].focus();
			return false;
		}
		return true;		
	}
	// END Validate Dedicated Server Form //