var priceList= null;
var newWind = null;

function open_priceList(plan_data) {
	// check if window already exists
	if (!priceList || priceList.closed) {
		// store new window object in global variable
		priceList = window.open("../about/plan_price_list.asp?pd=" + plan_data, "priceList","scrollbars=1,resizable,width=575,height=400, status=no");
		priceList.focus();

		}
	else {
		// window already exists, so bring it forward
		priceList.location = "../about/plan_price_list.asp?pd=" + plan_data, "priceList";
		priceList.focus();
		}
	}

function close_priceList(){
	if(priceList) {
		priceList.close()};
	}

function open_newWind(myURL, myWidth, myHeight) {
	// check if window already exists
	if (!newWind || newWind.closed) {
		// store new window object in global variable
		newWind = window.open(myURL, "newWind", "scrollbars=1,resizable,width=" + myWidth + ",height=" + myHeight + ", status=no");
		newWind.focus();

		}
	else {
		// window already exists, so bring it forward
		newWind.location = myURL, "newWind";
		newWind.focus();
		newWind.resizeTo(myWidth,myHeight);
		}
	}

function close_newWind(){
	if(newWind) {
		newWind.close()};
	}

function loadinparent(url, closeSelf){
	self.opener.location = url;
	if(closeSelf) self.close();
	}

function Rcertify() 
{
popupWin = window.open('http://www.bbbonline.org/cks.asp?id=101082211435418766', 'Participant','location=yes,scrollbars=yes,width=450,height=300'); 
window.name = 'opener';
} 

function makeNewWind(pgheight, pgwidth, pgname) {
	var attr="height=" + pgheight + ",width=" + pgwidth + ",menubar,scrollbars,status,resizable";
	window.open(pgname,"",attr);
	// Following necessary for a bug in Navigator 2 on Unix and Mac platforms
	if (navigator.appVersion.charAt(0) == "2" && navigator.appName == "Navigator") {
		window.open(pgname,"",attr);
		}
}

function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;

function preloadImages() {
	if (document.images) {
		First_ov = newImage("images/First_ov.gif");
		Prior_ov = newImage("images/Prior_ov.gif");
		Next_ov = newImage("images/Next_ov.gif");
		Last_ov = newImage("images/Last_ov.gif");
		BacktoList_ov = newImage("images/BacktoList_ov.gif");
		Blue_ov = newImage("images/reddn_b.gif");
		Yellow_ov = newImage("images/reddn_y.gif");
		preloadFlag = true;
	}
}

function post_alert() {
	  alert("Clicked it!");
	  }

// Following used only by af_form

function update_form(form) {
	  if( parseInt(navigator.appVersion) >= 3.0 ) { 
	    	if (form.same.checked) {
	    		form.contactemail.value = form.email.value;
	    		form.contact.value = form.pay.value;
	    		form.contactaddr1.value = form.payaddr1.value;
	    		form.contactaddr2.value = form.payaddr2.value;
	    		form.contactaddr3.value = form.payaddr3.value;
	    		form.contactcity.value = form.paycity.value;
	    		form.contactstate.value = form.paystate.value;
	    		form.contactzip.value = form.payzip.value;
	    		form.contactcountry.value = form.paycountry.value;
	    		form.contactphone.value = form.payphone.value;
	       		form.site.focus();
	       		form.site.select();
	    		}
	    	else {
	    		form.contactemail.value = "";
	    		form.contact.value = "";
	    		form.contactaddr1.value = "";
	    		form.contactaddr2.value = "";
	    		form.contactaddr3.value = "";
	    		form.contactcity.value = "";
	    		form.contactstate.value = "";
	    		form.contactzip.value = "";
	    		form.contactcountry.value = "USA";
	    		form.contactphone.value = "";
	       		form.contactemail.focus();
	       		form.contactemail.select();
	    		}
	    	}
	}

function gotopage(pgname) {
	location.href = pgname;
	}

function MirrorReverse() {
	var strImgID = "";
	var bname = navigator.appName;
	if (bname == "Microsoft Internet Explorer") {
		for (var i=0; i < document.images.length; i++) {
			if (document.images[i].id.length > 0) {
				strImgID = document.images[i].id.toString();
				if (document.getElementById(strImgID).className == "normal") {
					document.getElementById(strImgID).className = "reverse";
					    try
					    {
					        document.getElementById("FlipIt_" + strImgID).innerHTML = "Mirror Reverse View - Click here to return to Normal View";
					    }
					    catch (e){}
					}
				else if (document.getElementById(strImgID).className == "reverse") {
					document.getElementById(strImgID).className = "normal";
					    try
					    {
					        document.getElementById("FlipIt_" + strImgID).innerHTML = "Click here to see Mirror Reverse View";
					    }
					    catch (e){}
					}
				}
			}
		}
	else {
		alert ("We're sorry, only Microsoft Internet Explorer supports this function.");
		}
	}

/*
function init()
{
    OutputAds();
}

var xml = getxmlobj();
function getxmlobj()
{
    var xmlHttp=null;
    try 
    { 
        // Firefox, Opera 8.0+, Safari 
        xmlHttp=new XMLHttpRequest();
    }
    catch (e)
    {
        // Internet Explorer
        try
        {
            xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
        }
        catch (e)
        {
            xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
        }
    }
    return xmlHttp;
}


function OutputAds()
{
   try
   {
       if (xml)
       {
            xml.open("GET", "http://tag.contextweb.com/TagPublish/getjs.aspx?action=VIEWAD&cwrun=200&cwadformat=728X90&cwpid=501395&cwwidth=728&cwheight=90&cwpnet=1&cwtagid=41810");
            xml.onreadystatechange = OutputAdsComplete;
            xml.send(null);
        }
    }
    catch (e)
    {}
}

function OutputAdsComplete()
{
	if (xml.readyState == 4 && xml.status == 200)
	{
	    var Ad = null;
	    if (document.getElementById)
	        Ad = document.getElementById("Ad")
	    else if (document.all)
	        Ad = document.all["Ad"];
	        
	    if (Ad)
	        Ad.innerHTML = xml.responseText;
	}	
}
*/