function decision(url,delete_what){
	var message = "Are you sure that you want to delete " + delete_what + "?";
	if(confirm(message)) window.location.href = url;
}

function dlgConfirm(text) {
	return confirm("Are you sure you want to execute the following action?\n\n" + text);
}

function decision(url,delete_what){
	var message = "Are you sure that you want to delete " + delete_what + "?";
	if(confirm(message)) window.location.href = url;
}

function decisionComplete(url){
	var message = 'Do you want to mark this task as complete?\nAll completed tasks will be sent the \"My Diary\" section to the left.';
	if(confirm(message)) window.location.href = url;
}

function decisionSubmit(delete_what){
	var message = "Are you sure that you want to delete " + delete_what + "?";
	if(confirm(message)) document.deleteImage.submit();
}

function submitenter(myfield,e){
	var keycode;
	if (window.event) keycode = window.event.keyCode;
	else if (e) keycode = e.which;
	else return true;
	
	if (keycode == 13)  {
		document.login.submit();
		return false;
	} else {
		return true;
	}
}

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];
		}
	}
}

function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function insertHomeFlash() {
	var flash_src = '';
	flash_src += '<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0\" width=\"470\" height=\"290\">\n';
	flash_src += '<param name=\"movie\" value=\"/kids-village-intro.swf\" />\n';
	flash_src += '<param name=\"quality\" value=\"high\" />\n';
	flash_src += '<param name=\"wmode\" value=\"transparent\">\n'; 
	flash_src += '<embed src=\"/kids-village-intro.swf\" quality=\"high\" pluginspage=\"http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash\" type=\"application/x-shockwave-flash\" wmode=\"transparent\" width=\"470\" height=\"290\">\n';
	flash_src += '</embed>';
	flash_src += '</object>';
	document.write(flash_src);
}

var openMyModal = function(source) {
	modalWindow.windowId = "myModal";
	modalWindow.width = 559;
	modalWindow.height = 431;
	modalWindow.content = "<div style=\"width:559px;height:431px;background-image:url(/images/donationtravelV3/newsletter/newsletter-background.png);background-repeat:no-repeat;\"><iframe width='559' height='431' frameborder='0' scrolling='no' allowtransparency='true' src='" + source + "'>&lt/iframe></div>";
	modalWindow.open();
};