var topnavigationcurrentindex = 0;
var leftnavigationcurrentindex = 0;
var topnavigationovercurrent = null;
var navigating = false;
var form = '';
var countries = new Array('Argentina','Armenia','Australia','Austria','Bahrain','Belarus','Belgium','Belize','Benin','Bermuda','Bosnia and Herzegovina','Botswana','Brazil','Bulgaria','Canada','Chile','China','Colombia','Costa Rica','Croatia','Cuba','Cyprus','Czech Republic','Denmark','Ecuador','Egypt','El Salvador','Estonia','Faroe Islands','Finland','France','Georgia','Germany','Ghana','Greece','Grenada','Guatemala','Haiti','Honduras','Hungary','Iceland','India','Indonesia','Iran','Iraq','Ireland','Israel','Italy','Jamaica','Japan','Kazakhstan','Kenya','Korea','Kuwait','Kyrgyzstan','Latvia','Lebanon','Lesotho','Liberia','Liechtenstein','Lithuania','Luxembourg','Macedonia','Madagascar','Malawi','Malaysia','Malta','Mauritius','Mexico','Moldova','Monaco','Mongolia','Morocco','Mozambique','Namibia','Nepal','Netherlands','New Zealand','Nicaragua','Nigeria','Norway','Oman','Pakistan','Panama','Paraguay','Peru','Philippines','Poland','Portugal','Qatar','Romania','Russia','Rwanda','Saudi Arabia','Senegal','Sierra Leone','Singapore','Slovakia','Slovenia','South Africa','Spain','Sudan','Sweden','Switzerland','Syria','Taiwan','Thailand','Togo','Tunisia','Turkey','Uganda','Ukraine','United Arab Emirates','United Kingdom','United States','Uruguay','Uzbekistan','Venezuela','Vietnam','Yemen','Yugoslavia','Zambia','Zimbabwe');
var wheres = new Array('Select...','Press article','Web search','Colleague','Customer referral','Tradeshow','Advertising','Other');
function topnavigationhightlight(o, i)
{
	o = document.getElementById('topnavigation' + i);
	topnavigationovercurrent = o;
	o.style.color = 'Black';
}
function setCurrent(o, i)
{
	topnavigationhightlight(o, i);
	var t = document.getElementById('topnavigationdiv2');
	if (t)
	{
		t.onmouseover = o.onmouseover;
		t.onmouseout = o.onmouseout;
		t.onclick = o.onclick;
		t.style.left = (i * 123) + 'px';
		t.style.display = 'block';
	}
}
function topnavigationover(o, i)
{
	topnavigationhightlight(o, i);
	var t = document.getElementById('topnavigationtable' + i);
	if (t)
	{
		if (i == 3)
			t.className = 'topnavigationtableon topnavigationtablewidth';
		else
			t.className = 'topnavigationtableon';
	}
	t = document.getElementById('topnavigationdiv1');
	if (t)
	{
		t.onmouseover = o.onmouseover;
		t.onmouseout = o.onmouseout;
		t.onclick = o.onclick;
		t.style.left = (i * 123) + 'px';
		t.style.display = 'block';
	}
}
function topnavigationout(o, i)
{
	o = document.getElementById('topnavigation' + i);
	o.style.color = '#7a7a7a';
	var t = document.getElementById('topnavigationtable' + i);
	if (t)
		t.className = 'topnavigationtableoff';
	if (o == topnavigationovercurrent)
		topnavigationovercurrent = null;
	if (topnavigationcurrentindex != -1)
		topnavigationhightlight(document.getElementById('topnavigation' + topnavigationcurrentindex), topnavigationcurrentindex);
	t = document.getElementById('topnavigationdiv1');
	if (t)
		t.style.display = 'none';
}
function topnavigationcellover(o)
{
	o.className = 'topnavigationcellon';
}
function topnavigationcellout(o)
{
	o.className = 'topnavigationcelloff';
}
function leftnavigationover(i)
{
	if (i != leftnavigationcurrentindex)
		document.getElementById('left' + i).src = 'images/buttons/left-nav-square-bgr.gif';
}
function leftnavigationout(i)
{
	if (i != leftnavigationcurrentindex)
		document.getElementById('left' + i).src = '../images2/spix.gif';
}
function navigate(url)
{
	if (!navigating)
	{
		navigating = true;
		location = url;
	}
	else
		navigating = false;
}
var index = 0;
var percent = 0;
var fadefunction = 0;
var logocount = 0;
var includeLink = true;
function updateCustomerLogo(link)
{
	includeLink = link;
	if (document.getElementById('logo'))
		fadefunction = setInterval('fade(-5)', 50);
	else
		updateCustomerLogo2();
}
function updateCustomerLogo2()
{
	var customerLogo = document.getElementById('customerlogo');
	if (!customerLogo)
		return;
	customerLogo.style.display = 'none';
	if (logocount == 2)
	{
		logocount = 0;
		customerLogo.innerHTML = '<div id="logo" class="small" style="width: 155px; padding-left: 3px; padding-top: 5px; opacity: 0.0; filter: alpha(opacity=0);">Transforming how companies and candidates connect.</div>';
	}
	else
	{
		var s = '';
		switch (index)
		{
			case 0:
				s = 'cust-logo-tivo.gif';
				break;
			case 1:
				s = 'cust-logo-zappos.jpg';
				break;
			case 2:
				s = 'cust-logo-linkedin.gif';
				break;
			case 3:
				s = 'cust-logo-digg.jpg';
				break;
			case 4:
				s = 'cust-logo-mozilla.jpg';
				break;
			case 5:
				s = 'cust-logo-infinera.gif';
				break;
			case 6:
				s = 'cust-logo-ngenera.gif';
				break;
			case 7:
				s = 'cust-logo-advent.gif';
				break;
			case 8:
				s = 'cust-logo-suppsoft.gif';
				break;
			case 9:
				s = 'cust-logo-popmedia.gif';
				break;
			case 10:
				s = 'cust-logo-yodlee.gif';
				break;
			case 11:
				s = 'cust-logo-access.gif';
				break;

		}
		if (includeLink)
			customerLogo.innerHTML = '<a href="Customers.aspx"><img style="opacity: 0.0; filter: alpha(opacity=0);" id="logo" src="images/customer/' + s + '" border="0"></a>';
		else
			customerLogo.innerHTML = '<img style="opacity: 0.0; filter: alpha(opacity=0);" id="logo" src="images/customer/' + s + '" border="0">';
//				logocount++;	// Don't show text in rotating logos.
		index++;
		if (index > 11)
			index = 0;
	}
	var logo = document.getElementById('logo');
	logo.style.opacity = 0.0;
	logo.style.filter = 'alpha(opacity=0)';
	customerLogo.style.display = 'inline';
	fadefunction = setInterval('fade(5)', 50);
	percent = 0;
}
function fade(change)
{
	percent = percent + change;
	var customerLogo = document.getElementById('logo');
	customerLogo.style.opacity = percent / 100;
	customerLogo.style.filter = 'alpha(opacity=' + percent + ')';
	if (fadefunction && (percent == 100 || percent == 0))
	{
		clearInterval(fadefunction);
		if (percent == 0)
			updateCustomerLogo2();
	}
}
function setCookie(name, value)
{
	var d = new Date();
	d.setDate(d.getDate() + 30);
	document.cookie = name + '=' + escape(value) + '; expires=' + d.toUTCString();
}
function getCookie(name)
{
	var cookies = document.cookie;
	var p = 0;
	for (;;)
	{
		p = cookies.indexOf(name + '=', p);
		if (p == -1)
			return '';
		if (p == 0 || cookies.charAt(p - 1) == ';' || cookies.charAt(p - 1) == ' ')
		{
			p += name.length + 1;
			var p2 = cookies.indexOf(';', p);
			if (p2 == -1)
				p2 = cookies.length;
			return unescape(cookies.substring(p, p2));
		}
		else
			p++;
	}
}
var displayingError = false;
function checkInput()
{
	var firstName = getTextValue('FirstName');
	var lastName = getTextValue('LastName');
	var name = getTextValue('Name');
	var email = getTextValue('Email');
	var toEmail = getTextValue('ToEmail');
	var title = getTextValue('Title');
	var company = getTextValue('Company');
	var message = getTextValue('Message');
	var phone = (document.getElementById('Phone') ? getTextValue('Phone') : '1');
	var where = 1;
	var o = document.getElementById('Where');
	if (o)
		where = o.selectedIndex;
	
	if (firstName.length > 0 && lastName.length > 0 && name.length > 0 && email.length > 0 && emailvalid(email) && title.length > 0 && company.length > 0 && toEmail.length > 0 && message.length > 0 && phone.length > 0)
	{
		document.getElementById('errorDiv').style.display = 'none';
		document.getElementById('downloadDiv').style.display = 'inline';
	}
	else
	{
		document.getElementById('downloadDiv').style.display = 'none';
		document.getElementById('errorDiv').style.display = 'inline';
	}
	displayError2();
}
function getTextValue(id)
{
	var o = document.getElementById(id);
	if (o)
		return trim(o.value);
	else
		return ' ';
}
function displayError()
{
	displayingError = true;
	displayError2();
}
function displayError2()
{
	if (displayingError)
	{
		var o = document.getElementById('errorMessage');
		if (o)
		{
			var ok = true;
			ok = checkRequiredField('FirstName') && ok;
			ok = checkRequiredField('LastName') && ok;
			ok = checkRequiredField('Name') && ok;
			ok = checkRequiredField('Email') && ok;
			ok = checkRequiredField('Phone') && ok;
			ok = checkRequiredField('ToEmail') && ok;
			ok = checkRequiredField('Title') && ok;
			ok = checkRequiredField('Company') && ok;
			ok = checkRequiredField('Message') && ok;
			
			if (!ok)
				o.innerHTML = 'Please fill out missing information';
			else if (!checkEmailField('Email'))
				o.innerHTML = 'Please enter valid email address';
			else if (form == 'tellafriend' && !checkEmailsField('ToEmail'))
				o.innerHTML = 'Please enter valid email addresses';
			else
				o.innerHTML = '';
		}
	}
}
function checkRequiredField(id)
{
	var o = document.getElementById(id);
	if (o)
	{
		if (trim(o.value).length == 0)
		{
			hasError = true;
			o.style.backgroundColor = '#ffd8d9';
			return false;
		}
		else
		{
			o.style.backgroundColor = 'White';
			return true;
		}
	}
	else
		return true;
}
function checkRequiredSelectField(id)
{
	var o = document.getElementById(id);
	if (o.selectedIndex == 0)
	{
		hasError = true;
		o.style.backgroundColor = '#ffd8d9';
		return false;
	}
	else
	{
		o.style.backgroundColor = 'White';
		return true;
	}
}
function checkEmailField(id)
{
	var o = document.getElementById(id);
	if (!emailvalid(trim(o.value)))
	{
		hasError = true;
		o.style.backgroundColor = '#ffd8d9';
		return false;
	}
	else
	{
		o.style.backgroundColor = 'White';
		return true;
	}
}
function emailvalid(s)
{
	var regex = new RegExp('\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*');
	var matches = regex.exec(s);
	return (matches != null && s == matches[0]);
}
function checkEmailsField(id)
{
	var o = document.getElementById(id);
	if (!emailsvalid(trim(o.value)))
	{
		hasError = true;
		o.style.backgroundColor = '#ffd8d9';
		return false;
	}
	else
	{
		o.style.backgroundColor = 'White';
		return true;
	}
}
function emailsvalid(s)
{
	var regex = new RegExp('\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*(,\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*)*');
	var matches = regex.exec(s);
	return (matches != null && s == matches[0]);
}
function trim(s)
{
	var m = s.match(/^\s*(\S+(\s+\S+)*)\s*$/);
	return (m == null) ? "" : m[1];
}
function download()
{
	setCookie('jvFirstName', trim(document.getElementById('FirstName').value));
	setCookie('jvLastName', trim(document.getElementById('LastName').value));
	setCookie('jvEmail', trim(document.getElementById('Email').value));
	setCookie('jvTitle', trim(document.getElementById('Title').value));
	setCookie('jvCompany', trim(document.getElementById('Company').value));
	setCookie('jvCountry', trim(document.getElementById('Country').value));
	APIExecute('download2',
		trim(document.getElementById('FirstName').value) + '\n' +
		trim(document.getElementById('LastName').value) + '\n' +
		trim(document.getElementById('Email').value) + '\n' +
		trim(document.getElementById('Title').value) + '\n' +
		trim(document.getElementById('Company').value) + '\n' +
		trim(document.getElementById('Country').value) + '\n' +
		trim(document.getElementById('Phone').value) + '\n' +
		(document.getElementById('Communication').checked ? 'yes' : 'no'));
	OverlayDialogInstance.close();
}
function downloadReport()
{
	if (getCookie('jvFirstName').length)
		return true;
	displayForm('form', 'Jobvite Download', 'JobviteStrategicRecruiting.pdf#zoom=100');
	return false;
}
function downloadSocialRecruitmentReport()
{
	if (getCookie('jvFirstName').length)
		return true;
	displayForm('form', 'Jobvite Download', 'Jobvite-Social-Recruitment-Report.pdf#zoom=100');
	return false;
}
function downloadCaseStudy()
{
	if (getCookie('jvFirstName').length)
		return true;
	displayForm('form', 'Jobvite Download', 'SPRT_casestudy.pdf#zoom=100');
	return false;
}
function downloadTestimonials()
{
	if (getCookie('jvFirstName').length)
		return true;
	displayForm('form', 'Jobvite Download', 'Jobvite_testimonials.pdf#zoom=100');
	return false;
}
function downloadBrochure()
{
	if (getCookie('jvFirstName').length)
		return true;
	displayForm('form', 'Jobvite Download', 'Jobvite_brochure.pdf#zoom=100');
	return false;
}
function requestDemo()
{
	window.location.href = 'http://recruiting.jobvite.com/recruiting-demo-request.html';
}
function requestDemo2()
{
	form = 'demo';
	var d = new OverlayDialog();
	d.displayContent(
		'<table cellSpacing="0" cellPadding="0" width="540" border="0">' +
		'<tr height="2" bgcolor="white"><td width="2" colspan="3"><IMG height="2" src="../images2/spix.gif" width="2"></td></tr>' +
		'<tr><td bgcolor="white"><IMG height="99%" src="../images2/spix.gif" width="2"></td><td bgcolor="#76c436" width="536">' +
		'<table cellSpacing="0" cellPadding="0" width="100%">' +
		'<tr><td colspan="3" align="right" style="padding-top: 5px; padding-right: 5px;"><a href="javascript:OverlayDialogInstance.close()"><img id="closeHelpImage" src="../images2/CloseModuleX.gif" width="16" height="16" border="0"></a></td></tr>' +
		'<tr><td width="20"><IMG height="2" src="../images2/spix.gif" width="20"></td><td>' +
		'<table cellSpacing="0" cellPadding="0" width="100%">' +
		'<tr><td valign="top"><span class="header white">Request a Demonstration</span><br><br>' +
		'<table cellSpacing="0" cellPadding="0" border="0" width="100%" class="white">' +
		'<tr><td colspan="2">We are happy to show you more of Jobvite and answer your specific questions.<br><br>To schedule an individual web demonstration, please complete this form.  We\'ll be in touch with you within one business day.</td></tr><tr><td colspan="2"><IMG height="5" src="../images2/spix.gif" width="5"></td></tr>' +
		'<tr><td colspan="2"><IMG height="5" src="../images2/spix.gif" width="5"></td></tr>' +
		'<tr><td></td><td class="small black">Required fields*&nbsp;&nbsp;&nbsp;<span id="errorMessage" style="color: #AF1D36; font-weight: bold;"></span></td></tr>' +
		'<tr><td colspan="2"><IMG height="5" src="../images2/spix.gif" width="5"></td></tr>' +
		'<tr><td class="white">First Name*&nbsp;</td><td><input id="FirstName" onkeyup="checkInput()" type="text" value="' + getCookie('jvFirstName') + '" style="width: 255px;"/></td></tr>' +
		'<tr><td colspan="2"><IMG height="1" src="../images2/spix.gif" width="5"></td></tr>' +
		'<tr><td class="white">Last Name*&nbsp;</td><td><input id="LastName" onkeyup="checkInput()" type="text" value="' + getCookie('jvLastName') + '" style="width: 255px;"/></td></tr>' +
		'<tr><td colspan="2"><IMG height="1" src="../images2/spix.gif" width="5"></td></tr>' +
		'<tr><td class="white">Title*&nbsp;</td><td><input id="Title" onkeyup="checkInput()" type="text" value="' + getCookie('jvTitle') + '" style="width: 255px;"/></td></tr>' +
		'<tr><td colspan="2"><IMG height="1" src="../images2/spix.gif" width="5"></td></tr>' +
		'<tr><td class="white">Company*&nbsp;</td><td><input id="Company" onkeyup="checkInput()" type="text" value="' + getCookie('jvCompany') + '" style="width: 255px;"/></td></tr>' +
		'<tr><td colspan="2"><IMG height="1" src="../images2/spix.gif" width="5"></td></tr>' +
		'<tr><td class="white">Country*&nbsp;</td><td><span id="CountrySpan"></span></td></tr>' +
		'<tr><td colspan="2"><IMG height="1" src="../images2/spix.gif" width="5"></td></tr>' +
		'<tr><td class="white">Email*&nbsp;</td><td><input id="Email" onkeyup="checkInput()" type="text" value="' + getCookie('jvEmail') + '" style="width: 255px;"/></td></tr>' +
		'<tr><td colspan="2"><IMG height="1" src="../images2/spix.gif" width="5"></td></tr>' +
		'<tr><td class="white">Phone*&nbsp;</td><td><input id="Phone" onkeyup="checkInput()" type="text" value="' + getCookie('jvPhone') + '" style="width: 255px;"/></td></tr>' +
		'<tr><td colspan="2"><IMG height="1" src="../images2/spix.gif" width="5"></td></tr><tr><td width="190" class="white">How did you hear about us?</td><td><span id="WhereSpan"></span></td></tr><tr><td colspan="2"><IMG height="4" src="../images2/spix.gif" width="5"></td></tr><tr><td width="190" vAlign="top"><span class="white">Comments</span></td><td><textarea name="Comments" rows="5" id="Comments" style="width:255px;"></textarea></td></tr>' +
		'<tr><td colspan="2"><IMG height="1" src="../images2/spix.gif" width="5"></td></tr>' +
		'<tr><td colspan="2"><input id="Communication" type="checkbox" value="yes" checked="checked"/><label for="Communication"> Yes, I\'d like to receive future communications from Jobvite via email.</label></td></tr>' +
		'<tr><td colspan="2"><IMG height="20" src="../images2/spix.gif" width="5"></td></tr>' +
		'<tr><td></td><td>' +
		'<table cellSpacing="0" cellPadding="0" border="0" width="260">' +
		'<tr>' +
		'<td><a href="javascript:OverlayDialogInstance.close()"><img src="images/buttons/button-cancel.gif" border="0" /></a></td>' +
		'<td align="right">' +
		'<div id="errorDiv"><a href="javascript:displayError()"><img src="images/buttons/button-send.gif" border="0" /></a></div><div id="downloadDiv" style="display: none;"><a href="javascript:sendDemoRequest()"><img src="images/buttons/button-send.gif" border="0" /></a></div>' +
		'</td>' +
		'</tr></table></td></tr></table><br />' +
		'<span class="small">Your privacy is extremely important to us. We will not sell or rent your name or contact<br>information to any third party. For more information, see our <a class="black" href="PrivacyPolicy.aspx" target="_blank">Privacy Policy</a>.</span>' +
		'</td></tr></table></td><td width="20"><IMG height="2" src="../images2/spix.gif" width="20"></td></tr><tr><td colspan="3"><IMG height="20" src="../images2/spix.gif" width="20"></td></tr></table>' +
		'</td><td bgcolor="white"><IMG height="99%" src="../images2/spix.gif" width="2"></td></tr><tr height="2" bgcolor="white"><td colspan="3"><IMG height="2" src="../images2/spix.gif"></td></tr></table>');
	
	createWhereSelect(document.getElementById('WhereSpan'));
	createCountrySelect(document.getElementById('CountrySpan'));
	var country = getCookie('jvCountry');
	if (!country.length)
		country = 'United States';
	document.getElementById('Country').value = country;
	document.getElementById('downloadDiv').style.display = 'none';
	document.getElementById('errorDiv').style.display = 'inline';
	checkInput();
	var o = document.getElementById('FirstName');
	if (o)
		o.focus();
}
function requestContact()
{
	form = 'demo';
	var d = new OverlayDialog();
	d.displayContent(
		'<table cellSpacing="0" cellPadding="0" width="540" border="0">' +
		'<tr height="2" bgcolor="white"><td width="2" colspan="3"><IMG height="2" src="../images2/spix.gif" width="2"></td></tr>' +
		'<tr><td bgcolor="white"><IMG height="99%" src="../images2/spix.gif" width="2"></td><td bgcolor="#76c436" width="536">' +
		'<table cellSpacing="0" cellPadding="0" width="100%">' +
		'<tr><td colspan="3" align="right" style="padding-top: 5px; padding-right: 5px;"><a href="javascript:OverlayDialogInstance.close()"><img id="closeHelpImage" src="../images2/CloseModuleX.gif" width="16" height="16" border="0"></a></td></tr>' +
		'<tr><td width="20"><IMG height="2" src="../images2/spix.gif" width="20"></td><td>' +
		'<table cellSpacing="0" cellPadding="0" width="100%">' +
		'<tr><td valign="top"><span class="header white">Contact Us</span><br><br>' +
		'<table cellSpacing="0" cellPadding="0" border="0" width="100%" class="white">' +
		'<tr><td colspan="2">We are happy to answer your specific questions. Please complete this form.  We\'ll be in touch with you within one business day.</td></tr><tr><td colspan="2"><IMG height="5" src="../images2/spix.gif" width="5"></td></tr>' +
		'<tr><td colspan="2"><IMG height="5" src="../images2/spix.gif" width="5"></td></tr>' +
		'<tr><td></td><td class="small black">Required fields*&nbsp;&nbsp;&nbsp;<span id="errorMessage" style="color: #AF1D36; font-weight: bold;"></span></td></tr>' +
		'<tr><td colspan="2"><IMG height="5" src="../images2/spix.gif" width="5"></td></tr>' +
		'<tr><td class="white">First Name*&nbsp;</td><td><input id="FirstName" onkeyup="checkInput()" type="text" value="' + getCookie('jvFirstName') + '" style="width: 255px;"/></td></tr>' +
		'<tr><td colspan="2"><IMG height="1" src="../images2/spix.gif" width="5"></td></tr>' +
		'<tr><td class="white">Last Name*&nbsp;</td><td><input id="LastName" onkeyup="checkInput()" type="text" value="' + getCookie('jvLastName') + '" style="width: 255px;"/></td></tr>' +
		'<tr><td colspan="2"><IMG height="1" src="../images2/spix.gif" width="5"></td></tr>' +
		'<tr><td class="white">Title*&nbsp;</td><td><input id="Title" onkeyup="checkInput()" type="text" value="' + getCookie('jvTitle') + '" style="width: 255px;"/></td></tr>' +
		'<tr><td colspan="2"><IMG height="1" src="../images2/spix.gif" width="5"></td></tr>' +
		'<tr><td class="white">Company*&nbsp;</td><td><input id="Company" onkeyup="checkInput()" type="text" value="' + getCookie('jvCompany') + '" style="width: 255px;"/></td></tr>' +
		'<tr><td colspan="2"><IMG height="1" src="../images2/spix.gif" width="5"></td></tr>' +
		'<tr><td class="white">Country*&nbsp;</td><td><span id="CountrySpan"></span></td></tr>' +
		'<tr><td colspan="2"><IMG height="1" src="../images2/spix.gif" width="5"></td></tr>' +
		'<tr><td class="white">Email*&nbsp;</td><td><input id="Email" onkeyup="checkInput()" type="text" value="' + getCookie('jvEmail') + '" style="width: 255px;"/></td></tr>' +
		'<tr><td colspan="2"><IMG height="1" src="../images2/spix.gif" width="5"></td></tr>' +
		'<tr><td class="white">Phone*&nbsp;</td><td><input id="Phone" onkeyup="checkInput()" type="text" value="' + getCookie('jvPhone') + '" style="width: 255px;"/></td></tr>' +
		'<tr><td colspan="2"><IMG height="1" src="../images2/spix.gif" width="5"></td></tr><tr><td width="190" class="white">How did you hear about us?</td><td><span id="WhereSpan"></span></td></tr><tr><td colspan="2"><IMG height="4" src="../images2/spix.gif" width="5"></td></tr><tr><td width="190" vAlign="top"><span class="white">Comments</span></td><td><textarea name="Comments" rows="5" id="Comments" style="width:255px;"></textarea></td></tr>' +
		'<tr><td colspan="2"><IMG height="1" src="../images2/spix.gif" width="5"></td></tr>' +
		'<tr><td colspan="2"><input id="Communication" type="checkbox" value="yes" checked="checked"/><label for="Communication"> Yes, I\'d like to receive future communications from Jobvite via email.</label></td></tr>' +
		'<tr><td colspan="2"><IMG height="20" src="../images2/spix.gif" width="5"></td></tr>' +
		'<tr><td></td><td>' +
		'<table cellSpacing="0" cellPadding="0" border="0" width="260">' +
		'<tr>' +
		'<td><a href="javascript:OverlayDialogInstance.close()"><img src="images/buttons/button-cancel.gif" border="0" /></a></td>' +
		'<td align="right">' +
		'<div id="errorDiv"><a href="javascript:displayError()"><img src="images/buttons/button-send.gif" border="0" /></a></div><div id="downloadDiv" style="display: none;"><a href="javascript:sendContactRequest()"><img src="images/buttons/button-send.gif" border="0" /></a></div>' +
		'</td>' +
		'</tr></table></td></tr></table><br />' +
		'<span class="small">Your privacy is extremely important to us. We will not sell or rent your name or contact<br>information to any third party. For more information, see our <a class="black" href="PrivacyPolicy.aspx" target="_blank">Privacy Policy</a>.</span>' +
		'</td></tr></table></td><td width="20"><IMG height="2" src="../images2/spix.gif" width="20"></td></tr><tr><td colspan="3"><IMG height="20" src="../images2/spix.gif" width="20"></td></tr></table>' +
		'</td><td bgcolor="white"><IMG height="99%" src="../images2/spix.gif" width="2"></td></tr><tr height="2" bgcolor="white"><td colspan="3"><IMG height="2" src="../images2/spix.gif"></td></tr></table>');
	
	createWhereSelect(document.getElementById('WhereSpan'));
	createCountrySelect(document.getElementById('CountrySpan'));
	var country = getCookie('jvCountry');
	if (!country.length)
		country = 'United States';
	document.getElementById('Country').value = country;
	document.getElementById('downloadDiv').style.display = 'none';
	document.getElementById('errorDiv').style.display = 'inline';
	checkInput();
	var o = document.getElementById('FirstName');
	if (o)
		o.focus();
}
function createCountrySelect(o)
{
	var e = document.createElement('select');
	o.appendChild(e);
	e.id = 'Country';
	e.style.width = '260px';
	for (var i = 0; i < countries.length;)
	{
		var name = countries[i++];
		var opt = document.createElement('option');
		e.appendChild(opt);
		opt.innerHTML = name;
		opt.value = name;
	}
}
function createWhereSelect(o)
{
	var e = document.createElement('select');
	o.appendChild(e);
	e.id = 'Where';
	e.style.width = '260px';
	e.onchange = checkInput;
	for (var i = 0; i < wheres.length;)
	{
		var name = wheres[i++];
		var opt = document.createElement('option');
		e.appendChild(opt);
		opt.innerHTML = name;
		opt.value = (i == 1 ? '' : name);
	}
}
function tellAFriend()
{
	form = 'tellafriend';
	var d = new OverlayDialog();
	d.displayContent(
		'<table cellSpacing="0" cellPadding="0" width="540" border="0">' +
		'<tr height="2" bgcolor="white"><td width="2" colspan="3"><IMG height="2" src="../images2/spix.gif" width="2"></td></tr>' +
		'<tr><td bgcolor="white"><IMG height="99%" src="../images2/spix.gif" width="2"></td><td bgcolor="#76c436" width="536">' +
		'<table cellSpacing="0" cellPadding="0" width="100%">' +
		'<tr><td colspan="3" align="right" style="padding-top: 5px; padding-right: 5px;"><a href="javascript:OverlayDialogInstance.close()"><img id="closeHelpImage" src="../images2/CloseModuleX.gif" width="16" height="16" border="0"></a></td></tr>' +
		'<tr><td width="20"><IMG height="2" src="../images2/spix.gif" width="20"></td><td>' +
		'<table cellSpacing="0" cellPadding="0" width="100%">' +
		'<tr><td valign="top"><span class="header white">Tell a friend about Jobvite!</span><br><br>' +
		'<table cellSpacing="0" cellPadding="0" border="0" width="100%" class="white">' +
		'<tr><td></td><td class="small black">Required fields*&nbsp;&nbsp;&nbsp;<span id="errorMessage" style="color: #AF1D36; font-weight: bold;"></span></td></tr>' +
		'<tr><td colspan="2"><IMG height="5" src="../images2/spix.gif" width="5"></td></tr>' +
		'<tr><td class="white">Your Name*&nbsp;</td><td><input id="Name" onkeyup="checkInput()" type="text" value="' + getCookie('jvFirstName') + ' ' + getCookie('jvLastName') + '" style="width: 255px;"/></td></tr>' +
		'<tr><td colspan="2"><IMG height="1" src="../images2/spix.gif" width="5"></td></tr>' +
		'<tr><td class="white">Your Email*&nbsp;</td><td><input id="Email" onkeyup="checkInput()" type="text" value="' + getCookie('jvEmail') + '" style="width: 255px;"/></td></tr>' +
		'<tr><td colspan="2"><IMG height="1" src="../images2/spix.gif" width="5"></td></tr>' +
		'<tr><td class="white">Your Friend\'s Email*&nbsp;</td><td><input id="ToEmail" onkeyup="checkInput()" type="text" value="" style="width: 255px;"/></td></tr>' +
		'<tr><td colspan="2"><IMG height="5" src="../images2/spix.gif" width="5"></td></tr>' +
		'<tr><td></td><td class="small black">Please use a comma to separate each email address.</td></tr>' +
		'<tr><td colspan="2"><IMG height="5" src="../images2/spix.gif" width="5"></td></tr><tr><td width="190" vAlign="top"><span class="white">Your Message*</span></td><td><textarea name="Message" rows="5" id="Message" style="width:255px;">I thought you\'d like to learn about Jobvite, an on-demand recruitment application for growing companies. It\'s radically easy to use for everyone involved in hiring.</textarea></td></tr>' +
		'<tr><td colspan="2"><IMG height="20" src="../images2/spix.gif" width="5"></td></tr>' +
		'<tr><td></td><td>' +
		'<table cellSpacing="0" cellPadding="0" border="0" width="260">' +
		'<tr>' +
		'<td><a href="javascript:OverlayDialogInstance.close()"><img src="images/buttons/button-cancel.gif" border="0" /></a></td>' +
		'<td align="right">' +
		'<div id="errorDiv"><a href="javascript:displayError()"><img src="images/buttons/button-send.gif" border="0" /></a></div><div id="downloadDiv" style="display: none;"><a href="javascript:tellAFriendSubmit()"><img src="images/buttons/button-send.gif" border="0" /></a></div>' +
		'</td>' +
		'</tr></table></td></tr></table><br />' +
		'<span class="small">Your privacy is extremely important to us. We will not sell or rent your name or contact<br>information to any third party.</span>' +
		'</td></tr></table></td><td width="20"><IMG height="2" src="../images2/spix.gif" width="20"></td></tr><tr><td colspan="3"><IMG height="20" src="../images2/spix.gif" width="20"></td></tr></table>' +
		'</td><td bgcolor="white"><IMG height="99%" src="../images2/spix.gif" width="2"></td></tr><tr height="2" bgcolor="white"><td colspan="3"><IMG height="2" src="../images2/spix.gif"></td></tr></table>');
	
	document.getElementById('downloadDiv').style.display = 'none';
	document.getElementById('errorDiv').style.display = 'inline';
	var o = document.getElementById('Name');
	if (o)
		o.focus();
}
function tellAFriendSubmit()
{
	APIExecute('tellAFriend',
		trim(document.getElementById('Name').value) + '\n' +
		trim(document.getElementById('Email').value) + '\n' +
		trim(document.getElementById('ToEmail').value) + '\n' +
		trim(document.getElementById('Message').value));
	OverlayDialogInstance.close();
	confirmDialog2('Thank you for telling your friends about Jobvite.');
}
function displayForm(f, title, filename)
{
	form = f;
	var d = new OverlayDialog();
	d.displayContent(
		'<table cellSpacing="0" cellPadding="0" width="540" border="0">' +
		'<tr height="2" bgcolor="white"><td width="2" colspan="3"><IMG height="2" src="../images2/spix.gif" width="2"></td></tr>' +
		'<tr><td bgcolor="white"><IMG height="99%" src="../images2/spix.gif" width="2"></td><td bgcolor="#76c436" width="536">' +
		'<table cellSpacing="0" cellPadding="0" width="100%">' +
		'<tr><td colspan="3" align="right" style="padding-top: 5px; padding-right: 5px;"><a href="javascript:OverlayDialogInstance.close()"><img id="closeHelpImage" src="../images2/CloseModuleX.gif" width="16" height="16" border="0"></a></td></tr>' +
		'<tr><td width="20"><IMG height="2" src="../images2/spix.gif" width="20"></td><td>' +
		'<table cellSpacing="0" cellPadding="0" width="100%">' +
		'<tr><td valign="top"><span class="header white">' + title + '</span><br><br>' +
		'<table cellSpacing="0" cellPadding="0" border="0" width="100%" class="white">' +
		'<tr><td colspan="2"><IMG height="5" src="../images2/spix.gif" width="5"></td></tr>' +
		'<tr><td></td><td class="small black">Please complete this form to register for full access to all of our whitepapers, datasheets and other resources. We will not sell or rent your name or contact information to any third party.<br><span id="errorMessage" style="color: #AF1D36; font-weight: bold;"></span></td></tr>' +
		'<tr><td colspan="2"><IMG height="5" src="../images2/spix.gif" width="5"></td></tr>' +
		'<tr><td class="white">First Name&nbsp;</td><td><input id="FirstName" onkeyup="checkInput()" type="text" value="' + getCookie('jvFirstName') + '" style="width: 255px;"/></td></tr>' +
		'<tr><td colspan="2"><IMG height="1" src="../images2/spix.gif" width="5"></td></tr>' +
		'<tr><td class="white">Last Name&nbsp;</td><td><input id="LastName" onkeyup="checkInput()" type="text" value="' + getCookie('jvLastName') + '" style="width: 255px;"/></td></tr>' +
		'<tr><td colspan="2"><IMG height="1" src="../images2/spix.gif" width="5"></td></tr>' +
		'<tr><td class="white">Title&nbsp;</td><td><input id="Title" onkeyup="checkInput()" type="text" value="' + getCookie('jvTitle') + '" style="width: 255px;"/></td></tr>' +
		'<tr><td colspan="2"><IMG height="1" src="../images2/spix.gif" width="5"></td></tr>' +
		'<tr><td class="white">Company&nbsp;</td><td><input id="Company" onkeyup="checkInput()" type="text" value="' + getCookie('jvCompany') + '" style="width: 255px;"/></td></tr>' +
		'<tr><td colspan="2"><IMG height="1" src="../images2/spix.gif" width="5"></td></tr>' +
		'<tr><td class="white">Country&nbsp;</td><td><span id="CountrySpan"></span></td></tr>' +
		'<tr><td colspan="2"><IMG height="1" src="../images2/spix.gif" width="5"></td></tr>' +
		'<tr><td class="white">Email&nbsp;</td><td><input id="Email" onkeyup="checkInput()" type="text" value="' + getCookie('jvEmail') + '" style="width: 255px;"/></td></tr>' +
		'<tr><td colspan="2"><IMG height="1" src="../images2/spix.gif" width="5"></td></tr>' +
		'<tr><td class="white">Phone&nbsp;</td><td><input id="Phone" onkeyup="checkInput()" type="text" value="' + getCookie('jvPhone') + '" style="width: 255px;"/></td></tr>' +
		'<tr><td colspan="2"><IMG height="1" src="../images2/spix.gif" width="5"></td></tr>' +
		'<tr><td colspan="2"><input id="Communication" type="checkbox" value="yes" checked="checked"/><label for="Communication"> Yes, I\'d like to receive future communications from Jobvite via email.</label></td></tr>' +
		'<tr><td colspan="2"><IMG height="20" src="../images2/spix.gif" width="5"></td></tr>' +
		'<tr><td><IMG height="20" src="../images2/spix.gif" width="100"></td><td>' +
		'<table cellSpacing="0" cellPadding="0" border="0" width="260">' +
		'<tr>' +
		'<td></td>' +
		'<td align="right">' +
		'<div id="errorDiv"><a href="javascript:displayError()"><img src="images/buttons/button-download.gif" border="0" /></a></div><div id="downloadDiv" style="display: none;"><a onclick="download()" target="brochure" href="' + filename + '"><img src="images/buttons/button-download.gif" border="0" /></a></div>' +
		'</td>' +
		'</tr></table></td></tr></table><br />' +
		'<span class="small">Your privacy is extremely important to us. For more information, see our <a class="black" href="PrivacyPolicy.aspx" target="_blank">Privacy Policy</a>.</span>' +
		'</td></tr></table></td><td width="20"><IMG height="2" src="../images2/spix.gif" width="20"></td></tr><tr><td colspan="3"><IMG height="20" src="../images2/spix.gif" width="20"></td></tr></table>' +
		'</td><td bgcolor="white"><IMG height="99%" src="../images2/spix.gif" width="2"></td></tr><tr height="2" bgcolor="white"><td colspan="3"><IMG height="2" src="../images2/spix.gif"></td></tr></table>');
	
	createCountrySelect(document.getElementById('CountrySpan'));
	var country = getCookie('jvCountry');
	if (!country.length)
		country = 'United States';
	document.getElementById('Country').value = country;
	document.getElementById('downloadDiv').style.display = 'none';
	document.getElementById('errorDiv').style.display = 'inline';
	var o = document.getElementById('FirstName');
	if (o)
		o.focus();
}
function confirmDialog2(message)
{
	var d = new OverlayDialog();
	d.displayContent(
		'<table cellSpacing="0" cellPadding="0" width="300" border="0">' +
		'<tr height="2" bgcolor="white"><td width="2" colspan="3"><IMG height="2" src="../images2/spix.gif" width="2"></td></tr>' +
		'<tr><td bgcolor="white"><IMG height="99%" src="../images2/spix.gif" width="2"></td><td bgcolor="#76c436" width="536">' +
		'<table cellSpacing="0" cellPadding="0" width="100%">' +
		'<tr><td colspan="3" align="right" style="padding-top: 5px; padding-right: 5px;"><a href="javascript:OverlayDialogInstance.close()"><img id="closeHelpImage" src="../images2/CloseModuleX.gif" width="16" height="16" border="0"></a></td></tr>' +
		'<tr><td width="20"><IMG height="2" src="../images2/spix.gif" width="20"></td><td>' +
		'<table cellSpacing="0" cellPadding="0" width="100%">' +
		'<tr><td><IMG height="10" src="../images2/spix.gif" width="5"></td></tr>' +
		'<tr><td valign="top"><span class="white">' + message + '</span><br><br>' +
		'<tr><td><IMG height="20" src="../images2/spix.gif" width="5"></td></tr>' +
		'<tr><td align="center"><a href="javascript:OverlayDialogInstance.close()"><img src="images/buttons/button-close.gif" border="0" /></a></td></tr>' +
		'</table></td><td width="20"><IMG height="2" src="../images2/spix.gif" width="20"></td></tr><tr><td colspan="3"><IMG height="20" src="../images2/spix.gif" width="20"></td></tr></table>' +
		'</td><td bgcolor="white"><IMG height="99%" src="../images2/spix.gif" width="2"></td></tr><tr height="2" bgcolor="white"><td colspan="3"><IMG height="2" src="../images2/spix.gif"></td></tr></table>');
}
function displayScreenshot(path)
{
	var d = new OverlayDialog();
	d.displayContent(
		'<table cellSpacing="0" cellPadding="0" width="300" border="0">' +
		'<tr height="2" bgcolor="white"><td width="2" colspan="3"><IMG height="2" src="../images2/spix.gif" width="2"></td></tr>' +
		'<tr><td bgcolor="white"><IMG height="99%" src="../images2/spix.gif" width="2"></td><td bgcolor="#76c436" width="536">' +
		'<table cellSpacing="0" cellPadding="0" width="100%">' +
		'<tr><td colspan="3" align="right" style="padding-top: 5px; padding-right: 5px;"><a href="javascript:OverlayDialogInstance.close()"><img id="closeHelpImage" src="../images2/CloseModuleX.gif" width="16" height="16" border="0"></a></td></tr>' +
		'<tr><td width="20"><IMG height="2" src="../images2/spix.gif" width="20"></td><td>' +
		'<table cellSpacing="0" cellPadding="0" width="100%">' +
		'<tr><td><IMG height="10" src="../images2/spix.gif" width="5"></td></tr>' +
		'<tr><td valign="top"><span class="white"><img src="' + path + '" border="0"></span><br><br>' +
		'<tr><td><IMG height="10" src="../images2/spix.gif" width="5"></td></tr>' +
		'<tr><td align="center"><a href="javascript:OverlayDialogInstance.close()"><img src="images/buttons/button-close.gif" border="0" /></a></td></tr>' +
		'</table></td><td width="20"><IMG height="2" src="../images2/spix.gif" width="20"></td></tr><tr><td colspan="3"><IMG height="20" src="../images2/spix.gif" width="20"></td></tr></table>' +
		'</td><td bgcolor="white"><IMG height="99%" src="../images2/spix.gif" width="2"></td></tr><tr height="2" bgcolor="white"><td colspan="3"><IMG height="2" src="../images2/spix.gif"></td></tr></table>');
}
function sendDemoRequest()
{
	setCookie('jvFirstName', trim(document.getElementById('FirstName').value));
	setCookie('jvLastName', trim(document.getElementById('LastName').value));
	setCookie('jvEmail', trim(document.getElementById('Email').value));
	setCookie('jvPhone', trim(document.getElementById('Phone').value));
	setCookie('jvTitle', trim(document.getElementById('Title').value));
	setCookie('jvCompany', trim(document.getElementById('Company').value));
	setCookie('jvCountry', trim(document.getElementById('Country').value));
	APIExecute('demoRequest2',
		trim(document.getElementById('FirstName').value) + '\n' +
		trim(document.getElementById('LastName').value) + '\n' +
		trim(document.getElementById('Email').value) + '\n' +
		trim(document.getElementById('Title').value) + '\n' +
		trim(document.getElementById('Company').value) + '\n' +
		trim(document.getElementById('Country').value) + '\n' +
		trim(document.getElementById('Where').value) + '\n' +
		trim(document.getElementById('Phone').value) + '\n' +
		(document.getElementById('Communication').checked ? 'yes' : 'no') + '\n' +
		trim(document.getElementById('Comments').value));
	OverlayDialogInstance.close();
	confirmDialog2('Thank you for submitting your information. A Jobvite representative will contact you shortly to schedule a demonstration.');
}
function sendContactRequest()
{
	setCookie('jvFirstName', trim(document.getElementById('FirstName').value));
	setCookie('jvLastName', trim(document.getElementById('LastName').value));
	setCookie('jvEmail', trim(document.getElementById('Email').value));
	setCookie('jvPhone', trim(document.getElementById('Phone').value));
	setCookie('jvTitle', trim(document.getElementById('Title').value));
	setCookie('jvCompany', trim(document.getElementById('Company').value));
	setCookie('jvCountry', trim(document.getElementById('Country').value));
	APIExecute('request',
		'contact\n' +
		trim(document.getElementById('FirstName').value) + '\n' +
		trim(document.getElementById('LastName').value) + '\n' +
		trim(document.getElementById('Email').value) + '\n' +
		trim(document.getElementById('Title').value) + '\n' +
		trim(document.getElementById('Company').value) + '\n' +
		'\n' +
		trim(document.getElementById('Country').value) + '\n' +
		trim(document.getElementById('Where').value) + '\n' +
		trim(document.getElementById('Phone').value) + '\n' +
		(document.getElementById('Communication').checked ? 'yes' : 'no') + '\n' +
		'\n' +
		'\n' +
		'\n' +
		trim(document.getElementById('Comments').value));
	OverlayDialogInstance.close();
	confirmDialog2('Thank you for submitting your information. A Jobvite representative will contact you shortly.');
}

