var $swap;

function viewTestimonials(){
	testWin=window.open("http://www.execlearn.com/testimonials.php",'',"height=630,width=630,toolbar=no,statusbar=no,status=no,scrollbars=1")
}

function viewGuarantee(){
	gWin=window.open("http://www.mindedgetestprep.com/testPrepGuarantee.php",'',"height=350,width=630,toolbar=no,statusbar=no,status=no,scrollbars=1")
}

function doWindowOpen(win_url,win_name,win_features,set_parent) { 
  var new_win 
  new_win=window.open(win_url, win_name, win_features) 
  if (set_parent==1) {
    new_win.par=self 
  } 
new_win.focus();
}

function tos() {
	tosWin=window.open("popups/terms_of_use.php",'',"height=600,width=450,toolbar=no,statusbar=no,scrollbars=1")
}

function trademarks() {
	trademarksWin=window.open("popups/trademarks.php",'',"height=250,width=450,toolbar=no,statusbar=no,scrollbars=1")
}

function swapImage() {
	if ($swap!='right') {
		var $active = $('#maintopleft .active-img');
		var $next = ($('#maintopleft .active-img').next().length > 0) ? $('#maintopleft .active-img').next() : $('#maintopleft img:first');
		$active.fadeOut(function() {
			$active.removeClass('active-img');
			$next.fadeIn().addClass('active-img');
		});
		$swap = 'right';
	}
	else {
		var $active = $('#maintopright .active-img');
		var $next = ($('#maintopright .active-img').next().length > 0) ? $('#maintopright .active-img').next() : $('#maintopright img:first');
		$active.fadeOut(function() {
			$active.removeClass('active-img');
			$next.fadeIn().addClass('active-img');
		});
		$swap = 'left';
	}
}

/*##################################################################
##  accessibility form field background-color changing functions  ##
##      IE doesn't like the CSS method, so force the issue        ##
##################################################################*/

window.onload=function(){
	for(g=0;g<document.getElementsByTagName('input').length;g++){
		document.getElementsByTagName('input')[g].onfocus=function(){
			this.style.backgroundColor="#ffffcc";
		}
		document.getElementsByTagName('input')[g].onblur=function(){
				this.style.backgroundColor="white";
		}	
	}
	for(g=0;g<document.getElementsByTagName('select').length;g++){
		document.getElementsByTagName('select')[g].onfocus=function(){
			this.style.backgroundColor="#ffffcc";
		}
		document.getElementsByTagName('select')[g].onblur=function(){
			this.style.backgroundColor="white";
		}
	}
}