function submitForm(selectedImageName, selectedImageType){
		
	document.frmThumbnail.selectedImageName.value = selectedImageName;
	document.frmThumbnail.selectedImageType.value = selectedImageType;
		
	if(selectedImageType != '2'){ // 2 = FUNKY_CARD
		document.frmThumbnail.action = 'compose.htm';
	}else{
		document.frmThumbnail.action = 'composefunky.htm';
	}
		
	document.frmThumbnail.submit();
		
	return(true);
		
}
	
function load_thumnailImage(){
	var imgList = document.getElementsByTagName('IMG');
	var iCount = imgList.length;
	for(var x=0;x<iCount;x++)
	{
		if(imgList[x].id.match(/imgThumb.*/))
			thumnailImage_new(imgList[x].id);
	}
	//for(i=0;i<13;i++){
			
	//	thumnailImage_new("imgThumb" + i);
	//}
}

function thumnailImage_new(imageID) {
	thumnailImage[imageID] = new thumnailImage(imageID);
}

function thumnailImage(imageID){
		
	var imageSource = document.getElementById(imageID)
	if (imageSource) 
	{
		imageSource = imageSource.src;
		imageSource		= imageSource.substring(0, imageSource.length - 4);
			
		this.on			= new Image();
		this.on.src		= imageSource + '_over.jpg';
		this.off		= new Image();
		this.off.src	= imageSource + '.jpg';
	}			
}

function swapThumnailImage(imageID, status){
		
	try{
	if(status=='on'){
		document.getElementById(imageID).src = thumnailImage[imageID].on.src;
	}else{
		document.getElementById(imageID).src = thumnailImage[imageID].off.src;
	}
	}catch(er){}
}

function ValidateEmail(pEmail)
{
	var emailReg = "^[\\w-_\.]*[\\w-_\.]\@[\\w]\.+[\\w]+[\\w]$";
	var regex = new RegExp(emailReg);
	return regex.test(pEmail);
}