// the window.open function can take 1's and 0's or yes' and no's
// RESERVED WINDOW NAMES: donationwin, privacywin, formwin, imagewin


// DisplayImage is used to create a new popup window for enlarged versions of images
// Rather than just a window containing an img, it writes some html allowing for centering and a title
function DisplayImage(picURL,width,height) {
	var content="<title>Enlarged Image</title><center><img src='"+picURL+"' border=0></center>"
	ImageWindow=window.open("","imagewin","toolbar=no,scrollbars=no,status=no,menubar=no,height="+(height+30)+",width="+(width+20) );
	ImageWindow.document.write(content)
	ImageWindow.document.close()
}


function DisplayText(textURL) {
	var content=textURL
	DocWindow=window.open(content,"textwin","toolbar=no,scrollbars=yes,status=no,menubar=no,height=600,width=600");
}


// DisplayForm is used to create a new popup window for the donation form
// DON'T use "formwin" as a name, as the 'What is a CVV' link also pops up in a "formwin"
function DisplayForm(formURL) {
	window.open(formURL,"donationwin","resizable=yes,scrollbars=yes,menubar=yes,status=yes,toolbar=yes,height=600,width=640");
}


// Just be aware that donation-waimr.html uses the following embedded script, so avoid "privacywin" as well
// function DisplayForm(formURL) {
//	window.open(formURL,"privacywin","resizable=yes,scrollbars=yes,menubar=yes,status=yes,toolbar=yes,height=500,width=640");
// }


// Could use the following tiny script to give all WAIMR pages the name of 'WAIMR'
// <!-- this.name='WAIMR' -->


function DisplayWAGER(wagerURL) {
	window.open(wagerURL,"wagerwin","resizable=yes,scrollbars=yes,menubar=no,status=yes,toolbar=no,height=750,width=960");
}

// dollar function
function $() {
	var elements = new Array();
	for (var i = 0; i < arguments.length; i++) {
		var element = arguments[i];
		if (typeof element == 'string')
			element = document.getElementById(element);
		if (arguments.length == 1)
			return element;
		elements.push(element);
	}
	return elements;
}
// single object toggle - used 'block' rather than '' and started as diplay:none
function toggleme(obj) {
	var thing = $(obj);
	thing.style.display = (thing.style.display != 'none' ? 'none' : 'block' );
}

// multi object toggle - used 'block' rather than '' and started as diplay:none
function toggleus() {
	for ( var i=0; i < arguments.length; i++ ) {
		$(arguments[i]).style.display = ($(arguments[i]).style.display != 'none' ? 'none' : 'block' );
	}
}



