// preload images
if (document.images) {
	pic1= new Image(); 
	pic1.src="img/micon_binoculars_on.gif";
	pic2= new Image(); 
	pic2.src="img/micon_key_on.gif";
	pic3= new Image(); 
	pic3.src="img/micon_envelope_on.gif";
	pic4= new Image();
	pic4.src="img/icon_loadingcircle.gif";
	pic5= new Image();
	pic5src="img/icon_accept.png";
	pic6= new Image();
	pic6.src="img/icon_cancel.png";		
}

// CSS Browser Selector   v0.2.5
// Documentation:         http://rafael.adm.br/css_browser_selector
// License:               http://creativecommons.org/licenses/by/2.5/
// Author:                Rafael Lima (http://rafael.adm.br)
// Contributors:          http://rafael.adm.br/css_browser_selector#contributors
var css_browser_selector = function() {
	var 
		ua=navigator.userAgent.toLowerCase(),
		is=function(t){ return ua.indexOf(t) != -1; },
		h=document.getElementsByTagName('html')[0],
		b=(!(/opera|webtv/i.test(ua))&&/msie (\d)/.test(ua))?('ie ie'+RegExp.$1):is('gecko/')? 'gecko':is('opera/9')?'opera opera9':/opera (\d)/.test(ua)?'opera opera'+RegExp.$1:is('konqueror')?'konqueror':is('applewebkit/')?'webkit safari':is('mozilla/')?'gecko':'',
		os=(is('x11')||is('linux'))?' linux':is('mac')?' mac':is('win')?' win':'';
	var c=b+os+' js';
	h.className += h.className?' '+c:c;
}();
	
// begin: fader ----------------------------------------------- 
function opacity(id, opacStart, opacEnd, millisec) {
	//speed for each frame
	var speed = Math.round(millisec / 100);
	var timer = 0;

	//determine the direction for the blending, if start and end are the same nothing happens
	if(opacStart > opacEnd) {
		for(i = opacStart; i >= opacEnd; i--) {
			setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed));
			timer++;
		}
	} else if(opacStart < opacEnd) {
		for(i = opacStart; i <= opacEnd; i++)
			{
			setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed));
			timer++;
		}
	}
}


// get object position
var Position =(function(){function resolveObject(s){if(document.getElementById && document.getElementById(s)!=null){return document.getElementById(s);}else if(document.all && document.all[s]!=null){return document.all[s];}else if(document.anchors && document.anchors.length && document.anchors.length>0 && document.anchors[0].x){for(var i=0;i<document.anchors.length;i++){if(document.anchors[i].name==s){return document.anchors[i]}}}}var pos ={};pos.$VERSION = 1.0;
pos.set = function(o,left,top){if(typeof(o)=="string"){o = resolveObject(o);}if(o==null || !o.style){return false;}if(typeof(left)=="object"){var pos = left;left = pos.left;top = pos.top;}o.style.left = left + "px";o.style.top = top + "px";return true;};
pos.get = function(o){var fixBrowserQuirks = true;if(typeof(o)=="string"){o = resolveObject(o);}if(o==null){return null;}var left = 0;var top = 0;var width = 0;var height = 0;var parentNode = null;var offsetParent = null;offsetParent = o.offsetParent;var originalObject = o;var el = o;while(el.parentNode!=null){el = el.parentNode;if(el.offsetParent==null){}else{var considerScroll = true;if(fixBrowserQuirks && window.opera){if(el==originalObject.parentNode || el.nodeName=="TR"){considerScroll = false;}}if(considerScroll){if(el.scrollTop && el.scrollTop>0){top -= el.scrollTop;}if(el.scrollLeft && el.scrollLeft>0){left -= el.scrollLeft;}}}if(el == offsetParent){left += o.offsetLeft;if(el.clientLeft && el.nodeName!="TABLE"){left += el.clientLeft;}top += o.offsetTop;if(el.clientTop && el.nodeName!="TABLE"){top += el.clientTop;}o = el;if(o.offsetParent==null){if(o.offsetLeft){left += o.offsetLeft;}if(o.offsetTop){top += o.offsetTop;}}offsetParent = o.offsetParent;}}if(originalObject.offsetWidth){width = originalObject.offsetWidth;}if(originalObject.offsetHeight){height = originalObject.offsetHeight;}return{'left':left, 'top':top, 'width':width, 'height':height};};
pos.getCenter = function(o){var c = this.get(o);if(c==null){return null;}c.left = c.left +(c.width/2);c.top = c.top +(c.height/2);return c;};return pos;})();

function position(o) {
	var pos = Position.get(o);
	Position.set('zoomwrapper',pos);
}

// for use with the simplified showHide (without page fader)
//function position2(o,whichObject) {
function position2(whichObject) {
	var pos = Position.get(whichObject);
	Position.set(pos);
}

//change the opacity for different browsers
function changeOpac(opacity, id) {
	var object = document.getElementById(id).style; 
	object.opacity = (opacity / 100);
	object.MozOpacity = (opacity / 100);
	object.KhtmlOpacity = (opacity / 100);
	object.filter = "alpha(opacity=" + opacity + ")";
}

function shiftOpacity(id, millisec) {
	//if an element is invisible, make it visible, else make it ivisible
	if(document.getElementById(id).style.opacity == 0) {
		opacity(id, 0, 100, millisec);
	} else {
		opacity(id, 100, 0, millisec);
	}
}

function blendimage(divid, imageid, imagefile, millisec) {
	var speed = Math.round(millisec / 100);
	var timer = 0;
	
	//set the current image as background 
	document.getElementById(divid).style.backgroundImage = "url(" + document.getElementById(imageid).src + ")";
	
	//make image transparent
	changeOpac(0, imageid);
	
	//make new image
	document.getElementById(imageid).src = imagefile;

	//fade in image
	for(i = 0; i <= 100; i++) {
		setTimeout("changeOpac(" + i + ",'" + imageid + "')",(timer * speed));
		timer++;
	}
}

function currentOpac(id, opacEnd, millisec) {
	//standard opacity is 100
	var currentOpac = 100;
	
	//if the element has an opacity set, get it
	if(document.getElementById(id).style.opacity < 100) {
		currentOpac = document.getElementById(id).style.opacity * 100;
	}

	//call for the function that changes the opacity
	opacity(id, currentOpac, opacEnd, millisec)
}
// end: fader -----------------------------------------------

// show/hide elements
	/*
		usage: showHide('[div id]',[bool])
			1 = on/show, 0 = off/hide
			showHide() with no params passed will hide all hide-able elements by default
	*/		
var darkOpacity = 75;	// opacity level when fully visible. Options: 50, 60, 75
var fadeTime = 500; 	// dim layer fade time in miliseconds
var displayPause = 1200;		// pause before showing image (zoom)
var displayPause2 = 500;		// pause before showing image (other)
	
function showHide(whichDiv,whichState,whichImage) {
	
	if (whichDiv && whichState) {
		if (whichState == 1) {
			cleanUp();	// just in case, clean up any visible popups...
					
			// show
			document.getElementById('dimlayer').style.display="block";
			document.getElementById('dimlayer').className="opacityzero";
			opacity('dimlayer', 0, darkOpacity, fadeTime);			
			setTimeout("document.getElementById('"+whichDiv+"').style.display='block'",displayPause2);
			// focus on username field if login
			if (whichDiv=="popuplogin") {
				setTimeout("document.getElementById('f_username').focus()",500);
			}
		} else {
			// explicit hide
			document.getElementById('dimlayer').className="opacity"+darkOpacity;
			opacity('dimlayer', darkOpacity, 0, fadeTime);
			setTimeout("document.getElementById('dimlayer').style.display='none'",fadeTime);
		}
	} else {
		// hide everything
		cleanUp();			
		opacity('dimlayer', darkOpacity, 0, fadeTime);
		setTimeout("document.getElementById('dimlayer').style.display='none'",fadeTime);
	}	
}

// take out the trash and do the dishes
function cleanUp() {
	document.getElementById('popupsearch').style.display="none";
	document.getElementById('popuplogin').style.display="none";		
	document.getElementById('popupsupport_contact').style.display="none";
	document.getElementById('popupsupport_service').style.display="none";
	document.getElementById('popupsupport_bugreport').style.display="none";	
	document.getElementById('popupabout_contact_sales').style.display="none";
	document.getElementById('popupabout_contact_support').style.display="none";	
	document.getElementById('popuptrial').style.display="none";	
	document.getElementById('zoomwrapper').style.display="none";
	document.getElementById("zoomimage").innerHTML="";
	document.getElementById('popupnav_sub_trial').style.display="none";	
	document.getElementById('popupnav_sub_chat').style.display="none";	
	document.getElementById('popupnav_sub_demo').style.display="none";	
	document.getElementById('popup_whitepapers').style.display="none";	
}

// zoom
function populateImage(whichImage) {
	document.getElementById("zoomimage").innerHTML="<img src=\"img/"+whichImage+"\" alt=\"\" border=\"0\" />"
}

function zoomIn(whichDiv,whichImage) {
	if (whichImage) {
		// cleanup, just in case...
		document.getElementById('dimlayer').style.display="block";
		document.getElementById('dimlayer').className="opacityzero";
		
		// show
		populateImage(whichImage);		// load the image into it's wrapper
		document.getElementById('zoomimage').style.visibility="hidden";		// hide the image so that the loader can briefly display
		document.getElementById(whichDiv).style.margin="-150px 0px 0px -250px";		// realign the wrapper's position
		document.getElementById(whichDiv).style.left="50%";		 				
		opacity('dimlayer', 0, darkOpacity, fadeTime);		// start the page fader
		setTimeout("document.getElementById('"+whichDiv+"').style.display='block';",fadeTime);	// show the wrapper
		setTimeout("document.getElementById(\"zoomimage\").style.visibility=\"visible\"",displayPause);
	} else {
		// hide
		document.getElementById(whichDiv).style.display="none";
		document.getElementById('zoomimage').innerHTML="";
		opacity('dimlayer', darkOpacity, 0, fadeTime);
		setTimeout("document.getElementById('dimlayer').style.display='none'",fadeTime);			
	}
}

// submenu popout (3rd level)
popTimer = null;

function popoutTimeout(whichObject,whichState) {
	if (whichState == 0) {		// clear timer
		if (popTimer != null) {
			clearTimeout(popTimer);			
		}
	} else { 		// set timer
		popTimer = setTimeout("popout('"+whichObject+"')",500);	
	}
}

function popout(whichObject) {
	if (document.getElementById(whichObject).style.display=="none") {	// show...
		popoutTimeout(whichObject,0);	 
		document.getElementById(whichObject).style.display="block";
	} else {	// hide
		popoutTimeout(whichObject,0);
		document.getElementById(whichObject).style.display="none";	
	}	
}

// swap images on mouseover
	/*
		usage: swapImg('[image id]',[bool]]
			1 = on state, 0 = off state
			image id must be part of image file name. ex: id="foo" src="foo_on.gif"
	*/
function swapImg(whichImage,whichState) {
	if (whichState==1) {
		document.getElementById(whichImage).src="img/"+whichImage+"_on.gif";
	} else {
		document.getElementById(whichImage).src="img/"+whichImage+"_off.gif";	
	}
}

// prevent spam harvesters from snagging email addresses...
function noSpam(whichAddress) {
	var mailHost = "springcm."
	var mailDom = "com"
	document.write("<a href=\"mailto:"+whichAddress+"@"+mailHost+mailDom+"\">"+whichAddress+"@"+mailHost+mailDom+"</a>");
}

// forms --------------------------------------------------------

function clearValue(whichElement,emptyValue) {
	// if default value has not been edited, clear field on focus
	if (document.getElementById(whichElement).style.color!="#4D8EB6") {
		document.getElementById(whichElement).select();
		document.getElementById(whichElement).style.color="#16618f";
	}
	if (emptyValue && emptyValue==true) {		// flag to clear a field's value on focus
		document.getElementById(whichElement).value="";
	}
}

// alter field styles on focus
function showFocus(whichElement,whichState) {
	if (whichState == 1){
		// on 
		document.getElementById(whichElement).style.borderColor="black";
		document.getElementById(whichElement).style.borderWidth="1px";
		if (document.getElementById(whichElement).style.color!="#4D8EB6") {
			document.getElementById(whichElement).select();
			document.getElementById(whichElement).style.color="#16618f";
		}
	} else {
		// off 
		document.getElementById(whichElement).style.borderColor="silver";
		document.getElementById(whichElement).style.borderWidth="1px";																							
	}
}

// alter field type
function switchType(whichElement,newType) {
	document.getElementById(whichElement).type=newType;
}

// focus on specified field 
function focusOn(whichElement) {
	document.getElementById(whichElement).focus();
}

// handle "remember me" checkbox on login
function rememberMe() {
	if (document.getElementById('f_remember').checked==true) {
		document.getElementById('f_remember').checked=false
	} else {
		document.getElementById('f_remember').checked=true	
	}
}

// confirmation popup w/ redirect 
function confirmThis(theQuestion,sendTo) {
	var theAnswer = confirm(theQuestion);
	if (theAnswer == true) {
		if (sendTo != "back") {
			document.location.href=sendTo;
		} else {
			window.history.back();
		}
	}
}

// resize form textareas on the fly...
function resizeIt(whichObject,whichWay) {
	currentHeight = document.getElementById(whichObject).style.height;
	currentHeight = parseFloat(currentHeight);
	if (whichWay==1) {		// bigger
		if (currentHeight < 500) {
			newHeight = currentHeight+100;
			document.getElementById(whichObject).style.height=newHeight+"px";			
		}
	} else {		// smaller
		newHeight = currentHeight-100;	
		if (newHeight >= 100) {
			document.getElementById(whichObject).style.height=newHeight+"px";
		} else {
			document.getElementById(whichObject).style.height="100px";		
		}
	}
}

// legacy scripting ---------------------------

	function clearValue(whichElement) {
		// if default value has not been edited, clear field on focus
		if (document.getElementById(whichElement).style.color!="#4D8EB6") {
			document.getElementById(whichElement).select();
			document.getElementById(whichElement).style.color="#16618f";
		}
	}

/*	
	// alter field styles on focus
	function showFocus(whichElement,whichState) {
		if (whichState == 1){
			// on 
			document.getElementById(whichElement).style.borderColor="black";
			document.getElementById(whichElement).style.borderWidth="1px";
		} else {
			// off 
			document.getElementById(whichElement).style.borderColor="silver";
			document.getElementById(whichElement).style.borderWidth="1px";																							
		}
	}
*/	
	// instantly validate email fields
	function validateEmail() {
		if (document.getElementById('f_email').value!="" && document.getElementById('f_email2').value!="") {
			if (document.getElementById('f_email').value!=document.getElementById('f_email2').value) {
			// fail
				emailMsgContent = "<img src=\"img/icon_cancel.png\" border=\"0\" alt=\"[mismatch]\" align=\"absmiddle\" /> Email mismatch. Please try again.";
				document.getElementById('emailMessage').innerHTML = emailMsgContent;									
			} else {
			// pass
				emailMsgContent = "<img src=\"img/icon_accept.png\" border=\"0\" alt=\"[accepted]\" />";
				document.getElementById('emailMessage').innerHTML = emailMsgContent;									
			}
		}
	}

	// instantly validate password fields						
	function validatePassword() {
		if (document.getElementById('f_password').value!="" && document.getElementById('f_password2').value!="") {
			if (document.getElementById('f_password').value!=document.getElementById('f_password2').value) {
			// fail
				passwordMsgContent = "<img src=\"img/icon_cancel.png\" border=\"0\" alt=\"[mismatch]\" align=\"absmiddle\" /> Password mismatch. Please try again.";
				document.getElementById('passwordMessage').innerHTML = passwordMsgContent;
			} else {
			// pass
				passwordMsgContent = "<img src=\"img/icon_accept.png\" border=\"0\" alt=\"[accepted]\" />";
				document.getElementById('passwordMessage').innerHTML = passwordMsgContent;								
			}
		}
	}
	
	
	// swap rollover image
	function swapImage(whichImage,whichState) {
		if(whichState == 1) {
			document.getElementById(whichImage).src="/images/button_"+whichImage+"_on.gif";
		} else {
			document.getElementById(whichImage).src="/images/button_"+whichImage+"_off.gif";		
		}
	}
	
	// set proper text color on reload for fields with non-default values
		// ...hacked to work on multiple forms
	function checkColor(whichForm) {
		if (document.getElementById('f_nameFirst') == true) {
			if (whichForm == "trial") {
				// name, first
				if (document.getElementById('f_nameFirst').value!="first") {
					document.getElementById('f_nameFirst').style.color="#16618f";
				}
				// name, last
				if (document.getElementById('f_nameLast').value!="last") {
					document.getElementById('f_nameLast').style.color="#16618f";
				}
				// email1
				if (document.getElementById('f_email').value!="") {
					document.getElementById('f_email').style.color="#16618f";
				}
				// email2
				if (document.getElementById('f_email2').value!="") {
					document.getElementById('f_email2').style.color="#16618f";
				}
				// phone
				if (document.getElementById('f_phone').value!="") {
					document.getElementById('f_phone').style.color="#16618f";
				}
				// company name
				if (document.getElementById('f_companyName').value!="") {
					document.getElementById('f_companyName').style.color="#16618f";
				}
			}
		}
		
		if (whichForm == "demo") {
			// name, first
			if (document.getElementById('firstName').value!="first") {
				document.getElementById('firstName').style.color="#16618f";
			}
			// name, last
			if (document.getElementById('lastName').value!="last") {
				document.getElementById('lastName').style.color="#16618f";
			}
			// email1
			if (document.getElementById('email1').value!="") {
				document.getElementById('email1').style.color="#16618f";
			}
			
			// phone
			if (document.getElementById('telephone').value!="") {
				document.getElementById('telephone').style.color="#16618f";
			}
			// company name
			if (document.getElementById('company').value!="") {
				document.getElementById('company').style.color="#16618f";
			}		
		}
		
		if (whichForm == "contact") {
			// name, first
			if (document.getElementById('firstName').value!="first") {
				document.getElementById('firstName').style.color="#16618f";
			}
			// name, last
			if (document.getElementById('lastName').value!="last") {
				document.getElementById('lastName').style.color="#16618f";
			}
			// email1
			if (document.getElementById('email1').value!="") {
				document.getElementById('email1').style.color="#16618f";
			}
			
			// phone
			if (document.getElementById('telephone').value!="") {
				document.getElementById('telephone').style.color="#16618f";
			}
			// company name
			if (document.getElementById('company').value!="") {
				document.getElementById('company').style.color="#16618f";
			}
			// comments
				if (document.getElementById('comments').value!="") {
				document.getElementById('comments').style.color="#16618f";
			}	 		
		}
	}
	
	function spawnChat() {
		//var url = "http://asap2.convoq.com/AsapLinks/Meet.aspx?l=alytg4xhsg";
		var url = "http://livechat.boldchat.com/aid/7210244574434527415/bc.chat?cwdid=1736332496851268638&amp;url=" + escape(document.location.href);
		var pw = doPopupWindow(url, 'chat', '640', '480', 'dependent,scrollbars,resizable');
		checkPopup(pw);
	}
	
	// doPopupWindow
	function doPopupWindow(url, n, w, h, o) {
		if (w > screen.availWidth - 12)
		{
			w = screen.availWidth - 12;
		}
		
		if (h > screen.availHeight - 48) {
			h = screen.availHeight - 48;
		}
		
		// popup window left
		var _pw_l = (screen.availWidth - w - 12) / 2;
		
		// popup window top
		var _pw_t = (screen.availHeight - h - 48) / 2;
		
		// create
		var _pw_h = window.open(url, n, 'width=' + w + ',height=' + h + ',left=' + _pw_l + ',top=' + _pw_t + ',' + o);
		
		return _pw_h;
	}

	// checkPopup
	function checkPopup(pw) {
		if (pw == null) {
			alert('This feature uses a popup window to chat with a Sales Consultant.  Disable any popup blockers to view this window.');
		}
	}	
	
	// (whitepaper) be sure a whitepaper has been chosen
	function checkSelection() {
		var failFlag = 1; // fail by default
		if (document.forms[0].f_whichWhitepaper[0].checked==true) {
			failFlag = 0; // reset to false, ok to download
		} else if (document.forms[0].f_whichWhitepaper[1].checked==true) {
			failFlag = 0; 
		} else if (document.forms[0].f_whichWhitepaper[2].checked==true) {
			failFlag = 0;
		} else if (document.forms[0].f_whichWhitepaper[3].checked==true) {
			failFlag = 0;
		} else if (document.forms[0].f_whichWhitepaper[4].checked==true) {
			failFlag = 0;
		} else if (document.forms[0].f_whichWhitepaper[5].checked==true) {
			failFlag = 0;
		} else if (document.forms[0].f_whichWhitepaper[6].checked==true) {
			failFlag = 0;
		} else if (document.forms[0].f_whichWhitepaper[7].checked==true) {
			failFlag = 0;
		} else if (document.forms[0].f_whichWhitepaper[9].checked==true) {
			failFlag = 0;
		} else if (document.forms[0].f_whichWhitepaper[10].checked==true) {
			failFlag = 0;
		}

		
		if (failFlag > 0) {
			// fail
			whitepaperMsgContent = "<span class=\"texterror\"><img src=\"img/icon_cancel.png\" border=\"0\" alt=\"[error]\" align=\"absmiddle\" /> You must select a whitepaper to download.</span>";
			document.getElementById('whitepaperMessage').innerHTML = whitepaperMsgContent;
			return false;
		} else {
			return true;
		}
	}

	// start file download...
	function downloadFile(whichFile) {
		window.location = whichFile;
	}
	
	function startDownload(whichFile) {
		whichFile = whichFile;
		setTimeout('downloadFile(whichFile)', 1000);
	}
	// ............
		
	// begin: cookie-fu -----------------------------------
/*	
	function readCookie(name) {
		var nameEQ = name + "=";
		var ca = document.cookie.split(';');
		for(var i=0;i < ca.length;i++) {
			var c = ca[i];
			while (c.charAt(0)==' ') c = c.substring(1,c.length);
			if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
		}
		return null;
	}
*/	

/*
	// is OringalLandingURL cookie already set? If not, set it.
	var olu = readCookie('OriginalLandingURL');
	if (olu == null) {
		document.cookie = 'OriginalLandingURL='+window.location+'; path=/';
	}
	// read cookie again, double-check that OriginalLandingURL is set properly (workaround)
	var olu = readCookie('OriginalLandingURL');
	if (olu.match('css/doubleDots.gif')) {
		document.cookie = 'OriginalLandingURL='+window.location+'; path=/';
	}
*/	

/*
	// set referrer cookie
	var oru = readCookie('OriginalReferrerURL');
	if (oru == null) {
		if (document.referrer != "") {
			document.cookie = 'OriginalReferrerURL='+document.referrer+'; path=/';
		} else {
			document.cookie = 'OriginalReferrerURL=none/direct; path=/';
		}
	}
*/	

/*
	// set persistent trigger cookie for dhp using referrer URL...
	var trig = readCookie('triggerString');
	if (trig == null) {
		// no trigger cookie is set..
		if (document.referrer != "") {
			// if ref URL not empty, set trigger to ref URL
			document.cookie = 'triggerString='+document.referrer+'; path=/; expires=Mon, 01-Jan-2008 00:00:01 GMT;';			
		} else {
			// URL string IS empty, set trigger to 'none'
			document.cookie = 'triggerString=none; path=/; expires=Mon, 01-Jan-2008 00:00:01 GMT;';		
		}
	} else {
		// trigger IS set...
		if (trig.search(/none/i) > 0) {
			if (document.referrer != "") {
				// if ref URL is NOT empty,  set trigger to ref URL
				document.cookie = 'triggerString='+document.referrer+'; path=/; expires=Mon, 01-Jan-2008 00:00:01 GMT;';				
			}
		}
	}
*/	
	// end: cookie-fu -----------------------------------	

// start: show/hide in press section -----------------------------------	

	function showHidePress(whichDiv,whichState) {
		if (whichState==1) {
			// show
			document.getElementById(whichDiv).style.display="block";
		} else {
			// hide
			document.getElementById(whichDiv).style.display="none";			
		}
	}

// end: show/hide in press section -----------------------------------	

//offer rotation
function loadpage() {

    index1 = 0;
    listofimages = new Array(3);
    listofimages[0] = new Image(210,130)
    listofimages[0].src = "img/offers/frameone.jpg"
    listofimages[1] = new Image(210,130)
    listofimages[1].src = "img/offers/frametwo.jpg"
    listofimages[2] = new Image(210,130)
    listofimages[2].src = "img/offers/framethree.jpg"

    thetimer = setTimeout("changeimage()", 2000);

}

function changeimage(){

    index1 = index1 + 1
    if (index1 == "3") {

        index1 = 0 

    }
    imagesource = listofimages[index1].src
    window.document.banner1.src = imagesource

    thetimer = setTimeout("changeimage()", 3000);

}

function changeoffer() {

    if (index1 == 0) {

        newlocation = "http://springcm.com/v2/index.php?method=lp&sub=registration&event=3489" 

    }
    else if (index1 == 1) {

        newlocation = "http://springcm.com/v2/index.php?method=lp&sub=registration&event=3489" 

    }
    else if (index1 == 2) {

        newlocation = "http://springcm.com/v2/index.php?method=lp&sub=competitiveadvantage" 

    }
    
    location = newlocation 

} 


function changeSelected() {
	
	document.getElementById(this).setAttribute("class", "selected");

}

























