function swapImage(i) {
	if(i == "as") {
		if(imgAS == as1.src)
			imgAS = as2.src;
		else
			imgAS = as1.src
		newimage = imgAS;
	}
	if(i == "jr") {
		if(imgJR == jr1.src)
			imgJR = jr2.src;
		else
			imgJR = jr1.src
		newimage = imgJR;
	}
	document[i].src = newimage;	
}

function currentbutton(thispage) {
  if(document.getElementById) {
		if(thispage == "habeas")
	  	document.getElementById(thispage).className="currenthabeasbutton";
		else	
    	document.getElementById(thispage).className="currentbutton";
	}
}

function languageSelect() {
	str = "<div id='langselect'>\n";
	str += "Select language:\n";
	str += "<form action='"+"<"+"%"+"=request.servervariables(\"SCRIPT_NAME\")%>\" method='post'>\n";
	str += "<input '"+"<"+"%"+"checklanguage('English')%> name='language' type='submit' value='English'><br>\n";
	str += "<input '"+"<"+"%"+"checklanguage('Spanish')%> name='language' type='submit' value='Spanish'>\n";
	str += "</form>\n";
	str += "</div>\n";
	document.write(str);
}
/*
// Open a popup window
function openwin(file) {	
details = 'width=900,height=600,resizable=yes,scrollbars=yes,location=no,toolbar=no,status=no,left=20,top=20';
	if(typeof(newwin) == "undefined") {
  	alert("win: " + typeof(newwin));
  	newwin = window.open(file,'newwindow',details); 
} else {
	// make sure window exists and type is not "undefined" 
		if(newwin && typeof(newwin) != "undefined") {
			alert("win: " + typeof(newwin));
  		//newwin.close();
    	newwin = window.open(file,'newwindow',details); 
    	newwin.focus();
		}
	}
}
*/
//lastPopup = newwin;

/*
does window exist
is window open
*/

//<a href="javascript:winopen('/content/topics/promo.aspx/services%2fbroadband?c=us&cs=19&l=en&s=dhs&~lt=popup','Main','WIDTH=595,HEIGHT=400,RESIZABLE=YES,SCROLLBARS=YES,TOOLBAR=YES,LEFT=0,TOP=20');" class="lnk_promodetails">