// JavaScript Document
//Rounding Corner Global Call to load windows
window.onload=function()
{
	roundCorners();
} 

function roundCorners()
{
	Nifty("div#contactInfo","normal transparent top");
	Nifty("div#bodyTop","normal transparent bottom");
	Nifty("div#bodyMid","#000000");
	Nifty("div#bodyBottom","normal transparent all");
	Nifty("div#navBar a","normal transparent all");
	Nifty("div#entryForm","normal transparent all");
	Nifty("div#specials","normal transparent top");
}



//Ajax Stuff

function showPage(file, redirect)
{	
	new Ajax.Updater('bodyContent', 'includes/' + file, { method: 'get',parameters: {id: redirect}, evalScripts: true  });	
}


//Flash Creators
function createBanner () {
          	document.write ('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="100%" height="300">');
            document.write ('<param name="movie" value="flash/partSolutions.swf">');
            document.write ('<param name=quality value=high>');
            document.write ('<embed src="flash/partSolutions.swf" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="100%" height="300"></embed>');
          	document.write ('</object>');
}

//Form Vaildators
function validateContactForm(thisForm)
{
	var d = document.getElementById(thisForm);
	
	if (d.contactName.value.length == 0)
	{
    	alert('You must enter your name to continue.')
		d.contactName.focus();
		return false;
	}
	
	if (d.contactEmail.value.indexOf('@') == -1 || d.contactEmail.value.indexOf('.') == -1)
	{
		alert('You must specify a valid email address to continue.')
		d.contactEmail.focus();
		return false;
	} 
	
	if (d.Question.value.length == 0)
	{
    	alert('You must enter a question or comment to continue.')
		d.Question.focus();
		return false;
	}
	
	d.submit();
	return true;
}
