pagesponsors=new Array("$1,000 - Gold Sponsorship","$250 - Full Page","$125 - Half Page");

function setTitleImage() {
	if(document.getElementsByTagName && document.createElement){
		titleBox=document.getElementById('titlebar');
		titleImg=document.createElement('img');
		titleImg.setAttribute('alt',"Mickey's Kids");
		titleImg.setAttribute('src',"src/logo-title-03.jpg");
		titleImg.setAttribute('width', "552");
		titleImg.setAttribute('height', "100");
		titleImg.setAttribute('hspace', "0");
		titleImg.setAttribute('vspace', "0");
		titleImg.setAttribute('border', "0");
		titleBox.replaceChild(titleImg,titleBox.firstChild);
	}
}

function setGalleryImage(newimage,w,h) {
	if(document.getElementsByTagName && document.createElement){
		n=document.getElementById('currentimage');
		n.setAttribute('width',1);
		n.setAttribute('height',1);
		n.setAttribute('src',newimage);
		n.setAttribute('width',w);
		n.setAttribute('height',h);
	}
}

function checkForAllSpaces(str) {
	allspaces = true;
	l = str.length;
	for (var i = 0; i < str.length; i++) {
		if(str.charCodeAt(i) == 32) {}
		else {
			// The string is not all spaces
			return false;
		}
	}
	// The string is all spaces
	return true;
}


function Trim(TRIM_VALUE){
	if(TRIM_VALUE.length < 1){
		return"";
	}
	
	TRIM_VALUE = RTrim(TRIM_VALUE);
	TRIM_VALUE = LTrim(TRIM_VALUE);

	if(TRIM_VALUE==""){
		return "";
	} else {
		return TRIM_VALUE;
	}
}


function RTrim(VALUE){
	var w_space = String.fromCharCode(32);
	var v_length = VALUE.length;
	var strTemp = "";

       	if(v_length < 0){
       		return"";
	}
        
	var iTemp = v_length -1;
	
	while(iTemp > -1) {
		if(VALUE.charAt(iTemp) == w_space){}
		else{
			strTemp = VALUE.substring(0,iTemp +1);
			break;
		}		
		iTemp = iTemp-1;
	}
        
       	return strTemp;
}


function LTrim(VALUE){
	var w_space = String.fromCharCode(32);
	if(v_length < 1){
		return"";
	}
	
	var v_length = VALUE.length;
	var strTemp = "";
	var iTemp = 0;

	while(iTemp < v_length){
		if(VALUE.charAt(iTemp) == w_space){}
		else{
			strTemp = VALUE.substring(iTemp,v_length);
			break;
		}
		iTemp = iTemp + 1;
	}
	return strTemp;
}

function oI(page,w,h) { // openImage
	if(document.getElementById) {
		var dir="src/";
		var w=window.open(dir+page,"image","width="+w+",height="+h+",status=no,resizable=no");
	}
}

function oP(dir,page,w,h) { // openPictures
	if(document.getElementById) {
		var dir=dir+"/";
		var w=window.open(dir+page,"image","width="+w+",height="+h+",status=no,resizable=yes");
	}
}

function cw() { // Close Window
	if(document.getElementById) {
		window.close();
	}
}
