i1 = new Image();	i1.src = "images/login_kirkdirect_over.gif";
i2 = new Image();	i2.src = "images/login_kirkarchive_over.gif";
i3 = new Image();	i3.src = "images/link_moreinfo_over.gif";
i4 = new Image();	i4.src = "images/link_ourservices_over.gif";
i5 = new Image();	i5.src = "images/link_whychooseus_over.gif";
i6 = new Image();	i6.src = "images/link_ourclients_over.gif";
i7 = new Image();	i7.src = "images/nav_home_on.gif";
i8 = new Image();	i8.src = "images/download_brochure_over.gif";
i9 = new Image();	i9.src = "images/link_backtoallservices_over.gif";
i10 = new Image();	i10.src = "images/link_backtoallclients_over.gif";
i11 = new Image();	i11.src = "images/link_moreinfo2_over.gif";
i12 = new Image();	i12.src = "images/link_ebrochure_over.gif";
i13 = new Image();	i13.src = "images/login_kirkview_over.gif";
i14 = new Image();  i14.src = "images/link_previouspage_over.gif";
i15 = new Image();  i15.src = "images/link_gotonextpage_over.gif";
	
function rollOver(imgName)	
{
	imgSRC = document.images[imgName].src;
	var newImgSRC;
	if(imgSRC.indexOf("_over.gif") == -1)
	{
		newImgSRC = imgSRC.substring(0,imgSRC.indexOf(".gif")) + "_over.gif";
	}
	else
	{
		newImgSRC = imgSRC.substring(0,imgSRC.indexOf("_over.gif")) + ".gif";
	}	
		
	document.images[imgName].src = newImgSRC;
}


function openTerms()
{
	newwin = window.open("terms.html","terms","width=405,height=400,scrollbars=yes");
}

function openPrivacy()
{
	newwin = window.open("privacy.html","terms","width=405,height=400,scrollbars=yes");
}

// form validation
function validateForm(form)
{
	valid = true;
	message = "";
	if(form.elements["name"].value == "")
	{
		message += "Please enter your name\n";
		valid = false;
	}
	if(form.elements["email"].value == "")
	{
		message += "Please enter your email address\n";
		valid = false;
	}
	if(valid)
	{
		return true;
	}
	else
	{
		alert(message);
		return false;
	}
}	


// FLASH DETECTION
var isDOM = (document.getElementById) ? true : false;
var isIE = (navigator.appName == "Microsoft Internet Explorer") ? true : false;
var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;
var isNetscape = (!isOpera && (navigator.appName.indexOf("Netscape") != -1 && navigator.userAgent.indexOf("4.") != -1)) ? true : false;
var isMac = (navigator.userAgent.indexOf("Mac") != -1) ? true : false;

var bUsedHTML = ((isDOM || isIE || isNetscape) && !isMac) ? true : false
var iLatestFlashVersion = 6;
var iMinimumFlashVersion = 5;
var iFlashVersion = -1;

// Variable must be global for VBScript to work correctly.
var thisFlashVersion;
function flash_getIEVersion() {

	var thisMaxVersion = false;
	for(var currentVersion=iMinimumFlashVersion; currentVersion<=iLatestFlashVersion; currentVersion++) {
		document.write('<SCR'+'IPT LANGUAGE="VBScript">\n');
		document.write('on error resume next\n');
		document.write('thisFlashVersion = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.'+currentVersion+'")))\n');
		document.write('</SCR'+'IPT>\n');

		if(thisFlashVersion) {
			thisMaxVersion = currentVersion;
		}
	}
	return thisMaxVersion;
}

function flash_setVersion() {
	if (navigator.plugins.length > 0) {
		// Plugin detect, no VBScript support
		navigator.plugins.refresh(false);
		numPlugins = navigator.plugins.length;
		for(var i=0; i<numPlugins; i++)	{
			plugDesc = navigator.plugins[i].description;
			iFlashVersion = (plugDesc.indexOf("Flash") != -1) ? parseInt(plugDesc.charAt(parseInt(plugDesc.indexOf("Flash"))+6)) : 0;
			if(iFlashVersion > 0) {
				return;
			}
		}
	} else if(!isMac && (isIE || isOpera)) {
		// No plugin detect, VBScript support
		iFlashVersion = flash_getIEVersion();
	} else {
		// No plugin detect, no VBScript support
		iFlashVersion = iLatestFlashVersion;
	}
}

// Set Flash Version
flash_setVersion();

function printFlash(flashSRC, imageSRC, width, height, bgcolor)
{
	var pntStr;
	if(iFlashVersion >= iMinimumFlashVersion)
	{
		pntStr = "<object width=" + width + " height=" + height + " VIEWASTEXT>";
		pntStr += "<param name='movie' value='" + flashSRC + "'>";
		pntStr += "<param name='quality' value='high'>";
		pntStr += "<param name='bgcolor' value='" + bgcolor + "'>";
		pntStr += "<embed src='" + flashSRC + "' quality='high' ";
		pntStr += "type='application/x-shockwave-flash' width=" + width + " height=" + height + " bgcolor='" + bgcolor + "'>";
		pntStr += "</embed></object>";
	}
	else
	{
		pntStr = "<img src='" + imageSRC + "' width=" + width + " height=" + height + " alt='' border=0>";
	}
	document.write(pntStr);
}

function displayNav(section)
{
	var pntStr;
	if(iFlashVersion >= iMinimumFlashVersion)
	{
		pntStr = "<object width=757 height=30 VIEWASTEXT>" + 
		"<param name='movie' value='flash/kirk_nav.swf?section=" + section + "'>" + 
		"<param name='quality' value='high'>" + 
		"<param name='bgcolor' value='#ffffff'>" + 
		"<embed src='flash/kirk_nav.swf?section=" + section + "' quality='high' " + 
		"type='application/x-shockwave-flash' width='757' height='30' bgcolor='#ffffff'>" + 
		"</embed></object>";
	}
	else
	{
		var edgeGreys = '<td><img src="images/nav/edge_grey.gif" width="7" height="33" border="0"></td>';
		var redLeft = '<td><img src="images/nav/edge_redleft.gif" width="7" height="33" border="0"></td>';
		var redRight = '<td><img src="images/nav/edge_redright.gif" width="7" height="33" border="0"></td>';
		pntStr = '<table cellpadding="0" cellspacing="0" border="0" width="755" height="33">' + 
						 '<tr>' + 
						 	 '<td><img src="images/clear.gif" width="14" height="1" border="0"></td>' + 
							 '<td><a href="aboutus.html"><img src="images/nav/nav_aboutus' + ((section == "aboutus")? "_on" : "") + '.gif" width="75" height="33" alt="About Us" border="0"></a></td>' + 
							 ((section == "aboutus")? redLeft : ((section == "services")? redRight : edgeGreys )) + 
							 '<td><a href="services.html"><img src="images/nav/nav_services' + ((section == "services")? "_on" : "") + '.gif" width="72" height="33" alt="Services" border="0"></a></td>' + 
							 ((section == "services")? redLeft : ((section == "brand")? redRight : edgeGreys )) + 
							 '<td><a href="brand.html"><img src="images/nav/nav_brand' + ((section == "brand")? "_on" : "") + '.gif" width="130" height="33" alt="Brand Management" border="0"></a></td>' + 
							 ((section == "brand")? redLeft : ((section == "project")? redRight : edgeGreys )) + 
							 '<td><a href="project.html"><img src="images/nav/nav_project' + ((section == "project")? "_on" : "") + '.gif" width="137" height="33" alt="Project Management" border="0"></a></td>' + 
							 ((section == "project")? redLeft : ((section == "whychoose")? redRight : edgeGreys )) + 
							 '<td><a href="whychooseus.html"><img src="images/nav/nav_whychoose' + ((section == "whychoose")? "_on" : "") + '.gif" width="102" height="33" alt="Why Choose Us?" border="0"></a></td>' + 
							 ((section == "whychoose")? redLeft : ((section == "ourclients")? redRight : edgeGreys )) + 
							 '<td><a href="ourclients.html"><img src="images/nav/nav_ourclients' + ((section == "ourclients")? "_on" : "") + '.gif" width="88" height="33" alt="Our Clients" border="0"></a></td>' + 
							 ((section == "ourclients")? redLeft : ((section == "contactus")? redRight : edgeGreys )) + 
							 '<td><a href="contactus.html"><img src="images/nav/nav_contactus' + ((section == "contactus")? "_on" : "") + '.gif" width="84" height="33" alt="Contact Us" border="0"></a></td>' + 
							 '<td><img src="images/clear.gif" width="11" height="1" border="0"></td>' + 
							'</tr>' + 
							'</table>';
	}
	document.write(pntStr);
}