var totalImages = 18; // Total images used

browserName = navigator.appName;
browserVer = parseInt(navigator.appVersion);

ns3up = (browserName == "Netscape" && browserVer >= 3);
ie4up = (browserName.indexOf("Microsoft") >= 0 && browserVer >= 4);

//Disable right mouse click Script
//By Maximus (maximus@nsimail.com) w/ mods by DynamicDrive
//For full source code, visit http://www.dynamicdrive.com

var message="Copyright OceanSenseProductions.com - All Rights Reserved.\nUnauthorized use of Content & Images is strictly Prohibited";

///////////////////////////////////
function clickIE4(){
if (event.button==2){
alert(message);
return false;
}
}

function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
alert(message);
return false;
}
}
}

if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;
}

document.oncontextmenu=new Function("alert(message);return false")

function showPic(imgName) 
{
	if (ns3up || ie4up) 
		imgOn = ("images/nav/" + imgName);
		
	document.mainpic.src = imgOn;
}

if(document.images)
{
	mFX = new Array(totalImages);
	for(i = 0; i < mFX.length; i++)
	{
		mFX[i] = new Image();
	}
	
	mFX[0].src = "images/nav/home.gif";
	mFX[1].src = "images/nav/home-on.gif";
	mFX[2].src = "images/nav/biography.gif";
	mFX[3].src = "images/nav/biography-on.gif";
	mFX[4].src = "images/nav/services.gif";
	mFX[5].src = "images/nav/services-on.gif";
	mFX[6].src = "images/nav/library.gif";
	mFX[7].src = "images/nav/library-on.gif";
	mFX[8].src = "images/nav/equipment.gif";
	mFX[9].src = "images/nav/equipment-on.gif";
	mFX[10].src = "images/nav/opportunities.gif";
	mFX[11].src = "images/nav/opportunities-on.gif";
	mFX[12].src = "images/nav/resort-filming.gif";
	mFX[13].src = "images/nav/resort-filming-on.gif";
	mFX[14].src = "images/nav/contact.gif";
	mFX[15].src = "images/nav/contact-on.gif";
	mFX[16].src = "images/nav/links.gif";
	mFX[17].src = "images/nav/links-on.gif";
}

function imgFX(img, num)
{
	if(document.images)
	{
		document.images[img].src = mFX[num].src;
	}
}

function MM_preloadImages() 
{ //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function validateContactForm()
{
	fv = new formValidator();
	
	if (fv.isEmpty("your_name"))
		fv.raiseError("Please specify Your Name.");
		
	if (fv.isEmpty("company_name"))
		fv.raiseError("Please specify Your Company Name.");
		
	if (fv.isEmpty("your_email_address"))
		fv.raiseError("Please specify Your Email Address.");

//	if (fv.isEmpty("your_contact_number"))
//		fv.raiseError("Please specify Your Contact Number.");

	if (fv.isEmpty("your_message"))
		fv.raiseError("Please specify Your Message.");
	
	if (fv.numErrors() > 0)
	{
		fv.displayErrors();
		return false;
	}
	else
		return true;	
}