function ImgClick(iNum, sType)
{
	//alert(document.forms["frmImgView"].hidImgViewFile.value);
	if(sType == "videos")
	{
		PlayVideo((iNum-1))
	}
	else
	{
		document.forms["frmImgView"].hidImgViewFile.value = GetImgFile(iNum, sType);
		document.forms["frmImgView"].hidImgViewComment.value = GetComment(iNum, sType);
		document.forms["frmImgView"].submit();
	}
}

function GetComment(iNum)
{	
	obDiv = document.getElementById("div_comment_"+iNum);
	sRtn = obDiv.innerHTML;

	//alert(sRtn);
	return sRtn;
}	

function AddZero(iNum)
{
	//1 to 100
	sRtn = ""+iNum;

	if(iNum < 10)
		sRtn = "00"+sRtn;
	else if (iNum < 100)
		sRtn = "0"+sRtn;
	
	return sRtn;
}

function GetImgFile(iNum, sType)
{
	//return "images/pics/53_pic_"+AddZero(iNum)+".jpg";

	sSingleType = StripS(sType);
	return "images/"+sType+"/53_"+sSingleType+"_"+AddZero(iNum)+".jpg";
}

function StripS(sType)
{
	return sType.substring(0, (sType.length - 1))
}

//video stuff
function test()
{
	alert("test");
}

function PlayVideo(iOffset)
{
	obVideos = new Array();
	//suzy, 53rd, cretin hop, pinhead
	
	//suzy
	obVideos[0] = "<object width=\"425\" height=\"344\"><param name=\"movie\" value=\"http://www.youtube.com/v/0BOL4sIPBdQ&hl=en&fs=1\"></param><param name=\"allowFullScreen\" value=\"true\"></param><param name=\"allowScriptAccess\" value=\"always\"></param><embed src=\"http://www.youtube.com/v/0BOL4sIPBdQ&hl=en&fs=1\" type=\"application/x-shockwave-flash\" allowfullscreen=\"true\" allowScriptAccess=\"always\" width=\"425\" height=\"344\"></embed></object>";

	//53rd
	obVideos[1] = "<object width=\"425\" height=\"344\"><param name=\"movie\" value=\"http://www.youtube.com/v/4GcQVGL8MCE&hl=en&fs=1\"></param><param name=\"allowFullScreen\" value=\"true\"></param><param name=\"allowscriptaccess\" value=\"always\"></param><embed src=\"http://www.youtube.com/v/4GcQVGL8MCE&hl=en&fs=1\" type=\"application/x-shockwave-flash\" allowscriptaccess=\"always\" allowfullscreen=\"true\" width=\"425\" height=\"344\"></embed></object>";
	
	//cretin hop
	obVideos[2] = "<object width=\"425\" height=\"344\"><param name=\"movie\" value=\"http://www.youtube.com/v/An9Ag3ujvL8&hl=en&fs=1\"></param><param name=\"allowFullScreen\" value=\"true\"></param><param name=\"allowscriptaccess\" value=\"always\"></param><embed src=\"http://www.youtube.com/v/An9Ag3ujvL8&hl=en&fs=1\" type=\"application/x-shockwave-flash\" allowscriptaccess=\"always\" allowfullscreen=\"true\" width=\"425\" height=\"344\"></embed></object>";

	//pinhead
	obVideos[3] = "<object width=\"425\" height=\"344\"><param name=\"movie\" value=\"http://www.youtube.com/v/89R5wdL5aOs&hl=en&fs=1\"></param><param name=\"allowFullScreen\" value=\"true\"></param><param name=\"allowscriptaccess\" value=\"always\"></param><embed src=\"http://www.youtube.com/v/89R5wdL5aOs&hl=en&fs=1\" type=\"application/x-shockwave-flash\" allowscriptaccess=\"always\" allowfullscreen=\"true\" width=\"425\" height=\"344\"></embed></object>";
	
	
	obTD = document.getElementById("tdVideo");
	obTD.innerHTML = obVideos[iOffset]+"<br>"+GetVideoFooter(iOffset);

	//obTD = document.getElementById("tdVideoTitle");
	//obTD.innerHTML = GetVideoFooter(iOffset);
}

function GetVideoFooter(iOffset)
{
	//okay, so we have to write it twice...
	obComments = new Array("~Suzy Is a Headbanger / Let's Dance~<br>@ Skinny's Lounge", "~53rd And 3rd~<br>@ The Cat Club", "~Cretin Hop~<br>@ The Cat Club", "~Pinhead~<br>@ The Cat Club");

	sRtn = "<span class = \"text-16-bold\">"+obComments[iOffset]+"</span>";
	return sRtn
}

function GuestListValidate()
{
	bValid = true;

	if((document.getElementById("txtFirstName").value == "") || (document.getElementById("txtLastName").value == ""))
	{
		bValid = false;
		alert("You must enter both a first and last name to be added to the guest list");
	}
	
	if(bValid)
	{
		//document.getElementById("frmGuestList").submit();
		document.frmGuestList.submit();
	}
}

function Land()
{
	documnent.frmLand.submit();
}

function Shit()
{
	alert("shit!");
}