openedNav="none";
function swapImages(img_name, img_src){
	if (document.images){
		document[img_name].src = img_src;
    }
}
function changeImages(img_name, img_src){
	swapImages(img_name, img_src);
}
function subOvr(name, imgLoc){
	swapImages(name, imgLoc);
	menuOver();
	if(name!=siteSection2 && siteSection2!='none'){
		swapImages(siteSection2, 'images/top-nav/'+siteSection2Img+'_up.gif');
	}
}
function subUp(name, imgLoc){
	swapImages(name, imgLoc);
	menuRevert();
}
function openPopup(name, height, width){
	var winl = (screen.width - width) / 2;
	var wint = (screen.height - height) / 2;
	var windowName = name.slice(name.indexOf('-')+1, 50);
	var windowLoc = 'popups/'+name+'.asp';
	var winProps = 'toolbar=no,statusbar=no,location=no,scrollbars=no,resizable=yes,width='+width+',height='+height+',top='+wint+',left='+winl;
	window.open(windowLoc, windowName, winProps);
}
/**********************************************************************
 section 1 - below preloads navigation rollovers
 **********************************************************************/
function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}
var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		pre_about_ov = newImage('images/top-nav/About_ov.gif');
		pre_voc_ov = newImage('images/top-nav/VoC_ov.gif');
		pre_solutions_ov = newImage('images/top-nav/Solutions_ov.gif');
		pre_technology_ov = newImage('images/top-nav/Technology_ov.gif');
		pre_contact_ov = newImage('images/top-nav/Contact_ov.gif');
		pre_login_ov = newImage('images/top-nav/Login_ov.gif');
		pre_moreBtn_ov = newImage('images/dataBoxHeads/moreBtn_ov.jpg');
		preloadFlag = true;
	}
}

/**********************************************************************
 section 2 - below shows and hides navigation layers
 **********************************************************************/
////below is for the main nav
function show(id){
	menuOver();
	if(window.openedNav){
	if(id!=openedNav || siteSection=="none"){
		if(window.siteSection2 && siteSection2!="none"){
			swapImages(siteSection2, 'images/top-nav/'+siteSection2Img+'_ov.gif');
		}
		if(id=="about"){
			openedNav="about";
			document.getElementById("aboutDIV").style.visibility = 'visible';
			swapImages('About_up', 'images/top-nav/About_ov.gif');
		}else{
			document.getElementById("aboutDIV").style.visibility = 'hidden';
			swapImages('About_up', 'images/top-nav/About_up.gif');
		}
		if(id=="voc"){
			openedNav="voc";
			document.getElementById("vocDIV").style.visibility = 'visible';
			swapImages('VoC_up', 'images/top-nav/VoC_ov.gif');
		}else{
			document.getElementById("vocDIV").style.visibility = 'hidden';
			swapImages('VoC_up', 'images/top-nav/VoC_up.gif');
		}
		if(id=="solutions"){
			openedNav="solutions";
			document.getElementById("solDIV").style.visibility = 'visible';
			swapImages('Solutions_up', 'images/top-nav/Solutions_ov.gif');
		}else{
			document.getElementById("solDIV").style.visibility = 'hidden';
			swapImages('Solutions_up', 'images/top-nav/Solutions_up.gif');
		}
		if(id=="technology"){
			openedNav="technology";
			document.getElementById("techDIV").style.visibility = 'visible';
			swapImages('Technology_up', 'images/top-nav/Technology_ov.gif');
		}else{
			document.getElementById("techDIV").style.visibility = 'hidden';
			swapImages('Technology_up', 'images/top-nav/Technology_up.gif');
		}
		if(id=="contact"){
			openedNav="contact";
			swapImages('Contact_up', 'images/top-nav/Contact_ov.gif');
		}else{
			swapImages('Contact_up', 'images/top-nav/Contact_up.gif');
		}
	}}
}
function hideAll(){
	show(siteSection);
	if(siteSection2!='none'){
		swapImages(siteSection2, 'images/top-nav/'+siteSection2Img+'_ov.gif');
	}
}
function menuOver(){
	if(window.clearNav){
		window.clearTimeout(clearNav);
	}
}
function menuRevert(){
	clearNav = window.setTimeout("hideAll()", 1000);
}
/**********************************************************************
 section 3 - below is the layer styling
 **********************************************************************/
document.write ('<style>'
+'#aboutDIV    { visibility: hidden; position: absolute; width: 85px; height: 87px; z-index: 777; }\n'
+'#vocDIV    { visibility: hidden; position: absolute; width: 154px; height: 87px; z-index: 778; }\n'
+'#solDIV    { visibility: hidden; position: absolute; width: 104px; height: 87px; z-index: 779; }\n'
+'#techDIV    { visibility: hidden; position: absolute; width: 114px; height: 87px; z-index: 780; }\n'
+'</style>');

/**********************************************************************
 section 4 - below are the functions called on page load (content area)
 **********************************************************************/
function init() {
	hideAll();
	preloadImages();
}
/**********************************************************************
 section 5 - random factoid array
 **********************************************************************/
factoidArr=new Array();
factoidArr[0]=['30mil.gif', '<p><span class="darkGrayText">More than 30 million</span><br>customer voice data points<br>have been collected by<br>OpinionLab solutions<br>since 1999.</p>'];
factoidArr[1]=['3mil.gif', '<p><span class="darkGrayText">More than 3,500,000</span><br>OpinionLab comment cards<br>are opened each month.</p>'];
factoidArr[2]=['15thou.gif', '<p><span class="darkGrayText">More than 15,000</span><br>customer voice data points<br>are collected each day by<br>OpinionLab solutions.</p>'];
factoidArr[3]=['3thou.gif', '<p><span class="darkGrayText">OpinionLab solutions</span><br>are operating on more than 3000 websites worldwide.</p>'];
factoidArr[4]=['50.gif', '<p><span class="darkGrayText">OpinionLab solutions</span><br>are operating on websites<br>in 50 countries.</p>'];
factoidArr[5]=['30.gif', '<p><span class="darkGrayText">OpinionLab solutions </span><br>are available in <br>30 languages.</p>'];
factoidArr[6]=['6.gif', '<p><span class="darkGrayText">OpinionLab holds</span><br>6 patents in<br>Voice of Customer<br>technology.</p>'];
factoidArr[7]=['76sec.gif', '<p><span class="darkGrayText">Every .76 seconds,</span><br>someone somewhere<br>opens an OpinionLab<br>dynamic comment card.</p>'];
function insertRandomFactoid(){
	var randFact=Math.floor(Math.random()*7);
	document.write ('<td onClick="window.location.href=\'Impact.asp\';" style="background-image: url(images/dataBoxBG/'+factoidArr[randFact][0]+'); background-repeat: no-repeat;" class="dataBoxBIG" onmouseover="swapImages(\'moreBtn_up3\',\'images/dataBoxHeads/moreBtn_ov.jpg\');" onmouseout="swapImages(\'moreBtn_up3\',\'images/dataBoxHeads/moreBtn_up.jpg\');" valign="bottom" bgcolor="#d9d9d9" height="152">'+factoidArr[randFact][1]+'</td>');
}
/**********************************************************************
 section 6 - random OnlineOpinion image
 **********************************************************************/
function insertOnlineOpinionImg(){
	var randNum=Math.ceil(Math.random()*44);
	document.write ('<a onmouseover="swapImages(\'img_up\',\'images/dataBoxHeads/moreBtn_ov.jpg\');return true" onmouseout="swapImages(\'img_up\',\'images/dataBoxHeads/moreBtn_up.jpg\');return true" href="about_this_system.asp"><img src="images/img-box/img_top'+randNum+'.jpg" alt="" width="190" height="155" border="0">'
	+'<br><img src="images/dataBoxHeads/OnlineOpinion.gif" alt="" width="140" height="25" border="0"><img id="img_up" src="images/dataBoxHeads/moreBtn_up.jpg" alt="" name="img_up" width="50" height="25" border="0"></a>');
}
/**********************************************************************
 section 7 - window resizer
 **********************************************************************/
 function resizeWinToTable(tableName){
 	var extraHspace = (checkIt('win')) ? 10:0;
 	var extraVspace = (checkIt('win')) ? 25:-10;
	 if (screen.height>document.getElementById(tableName).offsetHeight){
			window.resizeTo(document.getElementById(tableName).offsetWidth+40+extraHspace,document.getElementById(tableName).offsetHeight+75+extraVspace);
	}else{
			window.resizeTo(screen.width-75,screen.height-75);
	}
}
function checkIt(string)
{
	place = navigator.userAgent.toLowerCase().indexOf(string) + 1;
	return place;
}	