﻿//	flashFile		[15 lines]	starts at line 15
//	getYX			[30 lines]	starts at line 40
//	viewContact		[11 lines]	starts at line 80
//	superComment	[40 lines]	starts at line 100
//	emailContact	[31 lines]	starts at line 150
//	bulletIn/Out	[08 lines]	starts at line 190
//	verNumThere		[01 lines]	starts at line 205
//	varihelper		[01 lines]	starts at line 206







function flashFile(ipw, iph, ipf, version)
{
	switch(version)
	{	case 1:
			document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" height="'+iph+'" width="'+ipw+'" align="left">');
			document.write('	<param name="wmode" value="transparent" />');
			document.write('	<param name="movie" value="'+ipf+'" />');
			document.write('	<param name="quality" value="best" />');
			document.write('	<param name="play" value="true" />');
			document.write('	<param name="scale" value="noscale" />');
			document.write('	<param name="salign" value="lt" />');
			document.write('		<embed wmode="transparent" scale="noscale" salign="lt" pluginspage="http://www.macromedia.com/go/getflashplayer" src="'+ipf+'" type="application/x-shockwave-flash" height="'+iph+'" width="'+ipw+'" quality="best" play="true" align="left" />');
			document.write('</object>');
		break;
	}
}









function getXY(e)
{	x = (window.Event) ? e.pageX : event.clientX;
	y = (window.Event) ? e.pageY : event.clientY;
	
	
	var outX = 0, outY = 0, scrOfY, scrOfX;
	if( typeof( window.pageYOffset ) == 'number' )
	{	//Netscape, Opera, Firefox compliant
			//scrOfY = window.pageYOffset; DO not use... scroll positions are already calculated into the cursor positions
			//scrOfX = window.pageXOffset;
		outX = x;
		outY = y;
	}
	else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) )
	{	//DOM compliant
			//scrOfY = document.body.scrollTop;
			//scrOfX = document.body.scrollLeft;
		outX = x;
		outY = y;
	}
	else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) )
	{	//IE6 standards compliant mode
		scrOfY = document.documentElement.scrollTop;
		scrOfX = document.documentElement.scrollLeft;
		outX = x + scrOfX;
		outY = y + scrOfY;
	}
	
	document.mousec.xc.value = outX;
	document.mousec.yc.value = outY;
}









function viewContact(phone, email)
{	var down = document.mousec.yc.value - 85;
	var left = document.mousec.xc.value - 150;
	var output = '<div style="position:absolute; width:280px; height:50px; ';
		output += ' left:'+left+'px; top:'+down+'px; background-color:#a9a2fd; ';
		output += ' border:2px solid #1b192e; padding:5px; font-size:12px;">';
		output += '<font style="font-weight:bold; font-size:10px;">Phone:</font> '+phone+'<br/>';
		output += '<font style="font-weight:bold; font-size:10px;">Email:</font> '+email+'<br/>';
		output += '<div style="font-weight:bold; font-size:11px; color:#932931; margin-top:4px; background-color:#cecaff; width:100%; text-align:center;">"Click to Email"<br/></div>';
		output += '</div>';
	document.getElementById("infoPop").innerHTML = output;
}








function superComment(name, quote, size, col, left, down)
{	var y = document.mousec.yc.value;
	var x = document.mousec.xc.value;

				
	switch(size)
	{	case 0: var width = 200;	var height = 90;	break;
		case 1: var width = 240;	var height = 80;	break;
		case 2:	var width = 230;	var height = 120;	break;
		case 3:	var width = 280;	var height = 140;	break;
		case 4:	var width = 290;	var height = 170;	break;
		case 5:	var width = 300;	var height = 200;	break;
		case 6: var width = 400;	var height = 270;	break;
	}			
				var rgt = (col > 2);
				var from = rgt?"r":"l";
				
				left = rgt?left - width+10:left + 106;
				down = down - height + 50;
				
				var wid16 = width-16;
				var left8 = rgt?8:13;
				var left40 = rgt?40:45;
				
					width = width + 5;
					height = height + 5;
				
	
	var output = '<div style="position:absolute; width:'+width+'px; height:'+height+'px; ';
		output += ' left:'+left+'px; top:'+down+'px; background-image: url(img/bubbles/superBubble'+size+''+from+'.png); ';
		output += ' font-size:11px; font-family:tahoma;">';
		output += 	'<div style="position:relative; width:100%; height:auto; left:0px; top:0px;">';
		output += 		'<div style="position:absolute; width:100%; height:20px; left:'+left40+'px; top:8px; letter-spacing:2px; font-variant: small-caps; font-size:15px; font-weight:bold; color:#162136;">'+name+'</div>';
		output += 			'<div style="position:absolute; width:'+wid16+'px; height:auto; left:'+left8+'px; top:32px; font-weight:bold; color:#455575; line-height:14px;">';
		output += 			quote
		output += 		'</div></div>';
		output += 	'<div style="position:absolute; bottom:5px; left:0px; font-weight:bold; font-size:11px; color:#937729; width:100%; text-align:center;">"Click to Email Me"</div>';
		output += '</div>';
	document.getElementById("infoPopLeadership").innerHTML = output;
}










function emailContact(name, email)
{	var random = Math.floor(Math.random()*9999);

	var help = '<div id="varihelp" style="position:absolute; width:150px; height:50px; ';
		help += ' left:200px; top:150px; background-color:#a9a2fd; ';
		help += ' border:2px solid #1b192e; padding:5px; font-size:12px; text-align:left; visibility:hidden;">';
		help += '<img src="img/gen/colorbox.php?r=0&g=0&b=0" width="15" height="15" align="texttop"/> Lowercase Character';
		help += '<br/><img src="img/gen/colorbox.php?r=110&g=155&b=56" width="15" height="15" align="texttop"/> Uppercase Character';
		help += '<br/><img src="img/gen/colorbox.php?r=160&g=100&b=100" width="15" height="15" align="texttop"/> Number';
		help += '</div>';

	var output = '<div style="width:90%; background-color:#495875; border:1px solid #aca9c6; "><a name="emailcontactsection"></a>';
		output += '<div style="position:relative; border:1px solid black; width:95%; background-image: url(img/background_body.gif); margin:5px; font-size:13px; color:white; font-weight:bold;">';
		output += '<div id="send_sent">Send an email message to <font color="#cac9f4">'+email+'</font></div>'+help;
		output += '<div style="position:absolute; width:100%; height:18px; left:0px; text-align:right; top:0px;"><button type="button" onclick="document.getElementById(\'emailStick\').innerHTML=\'\';">X</button></div>';
		output += '</div>';
		output += '<div id="email_form"><form name="emailForm" id="emailForm" action="email_submit.php" target="contentSeed" method="post" style="padding:0px; margin:0px;">';
		output += '<input type="hidden" name="emailtoaddress" value="'+email+'"/>';
		output += '<input type="hidden" name="emailtoname" value="'+name+'"/>';
		output += '<textarea name="emailtomessage" id="emailtomessage" style="width:400px; height:200px;" onkeyup="verNumThere(document.emailForm.emailtovarify.value, this.value);"></textarea>';
		output += '<table width="146" border="0" cellpadding="0" cellspacing="0"><tr><td width="53">';
		output += 		'<input name="emailtovarify" type="text" id="emailtovarify" style="padding:2px; border:1px solid #CCCCCC; width:53px; height:16px; font-family:Verdana; font-size:12px;" onclick="varihelper(\'visible\');" onblur="varihelper(\'hidden\');" onkeyup="verNumThere(this.value, document.emailForm.emailtomessage.value);"/>';
		output += '</td><td width="93">';
		output += 		'<img src="img/gen/verify.php?'+random+'" width="93" height="22" align="absbottom" />';
		output += '</td></tr></table>';
		output += '<input type="submit" name="submitButton" id="submitButton" value="Send Message" disabled="disabled" style="width:150px;"/>';
		output += '</form></div>';
		output += '<div id="returnMessage" style="width:90%; text-align:center; font-size:12px; padding:2px; font-weight:bold; background-color:#b2b7c1; margin-bottom:5px; visibility:hidden;"></div>';
		output += '</div>';
	document.getElementById("emailStick").innerHTML = output;
	document.location.hash="emailcontactsection";
}








function bulletIn(pos, to, x, y)
{	var output = '';
		output += '<div style="position:'+pos+'; width:30px; height:30px; left:'+x+'px; top:'+y+'px; text-align:left;"><img src="img/linkOut/bullet.png"/></div>';
	document.getElementById(to).innerHTML = output;
}

function bulletOut(to)
{	document.getElementById(to).innerHTML = "";
}




var lastShown = false;
function showUpcoming(id, height)
{	if(lastShown)
	{	document.getElementById(lastShown).className = "sd1ContentClosed";
		document.getElementById(lastShown).style.height = 0+"px";}
	lastShown = id;
	if(lastShown)
	{	document.getElementById(id).className = "sd1ContentOpen";
		document.getElementById(id).style.height = height+"px";}
}




















function verNumThere(value, value2){document.emailForm.submitButton.disabled = (value.length != 4 || value2.length < 6);}
function varihelper(value){document.getElementById("varihelp").style.visibility = value;}