function toggle_show(id)
{
	$(id).toggleClassName('hide');
}
function upload_image()
{
	$('upload_table').removeClassName('hide');
}
/*function add_upload()
{
	if($('upload_count').value==10)
		return false;
	var photo_upload =  '<table width="602" border="0" align="center" cellpadding="0" cellspacing="0">';
		photo_upload =  photo_upload + '<tr>';
		photo_upload =  photo_upload + '<td width="107" align="right" valign="middle">Upload Picture:&nbsp;&nbsp; </td>';
		photo_upload =  photo_upload + '<td width="233" height="22" align="left" valign="middle"><input name="photo[]" type="file" class="browsebox"></td>';
		photo_upload =  photo_upload + '<td width="71" align="right" valign="middle">Category:&nbsp;&nbsp; </td>';
		photo_upload =  photo_upload + '<td width="191" height="22" align="left" valign="middle"><select name="category[]" class="combobox150">';
		for (x=0; x<category_id.length; x++)
		{
			photo_upload =  photo_upload + '<option value='+category_id[x]+'>'+category_name[x]+'</option>';	
		}              
        photo_upload =  photo_upload + '</select></td>';
        photo_upload =  photo_upload + '</tr>';
        photo_upload =  photo_upload + '<tr>';
		photo_upload =  photo_upload + '<td align="right" valign="middle"> </td>';
		photo_upload =  photo_upload + '<td height="12" align="left" valign="middle" class="text11">File must be in .gif, .jpg or .jpeg format only.</td>';
        photo_upload =  photo_upload + '<td align="right" valign="middle">Caption:&nbsp;&nbsp; </td>';
		photo_upload =  photo_upload + '<td height="22" align="left" valign="middle"><input name="caption[]" type="text" class="txtbox100"></td>';
		photo_upload =  photo_upload + '</tr>';
		photo_upload =  photo_upload + '</table>';
				  
	$('add_upload').append('div',{align:'left'}).update(photo_upload);
	$('upload_count').value = parseInt(parseInt($('upload_count').value) + parseInt(1));
}*/

function add_guest_user(){
	$('upload_count').value = parseInt(parseInt($('upload_count').value) + parseInt(1));
	
	var photo_upload =  '<table width="629" border="0" align="center" cellpadding="1" cellspacing="1">';          
        photo_upload =  photo_upload + '<tr>';
        photo_upload =  photo_upload + '<td width="63" align="center">'+$('upload_count').value+'</td>';
        photo_upload =  photo_upload + '<td width="227" align="left"><input type="text" name="txt_friend_name[]" class="txtbox150"></td>';
        photo_upload =  photo_upload + '<td width="329" colspan="2" align="left"><input type="text" name="txt_friend_email[]" class="txtbox210"></td>';
        photo_upload =  photo_upload + '</tr>';
        photo_upload =  photo_upload + '</table>';
				  
	$('add_guest_user').append('div',{align:'left'}).update(photo_upload);
	
}

function right(e) {
var msg = "Sorry, you don't have permission to right-click.";
if (navigator.appName == 'Netscape' && e.which == 3) {
	alert(msg);
	return false;
}
if (navigator.appName == 'Microsoft Internet Explorer' && event.button==2) {
	alert(msg);
	return false;
}
	else return true;
}

function init() 
{
  messageObj = new DHTML_modalMessage();	// We only create one object of this class
  messageObj.setShadowOffset(5);	// Large shadow	

  if(document.images)
  {
    for(i=0;i<document.images.length;i++)
    {
      document.images[i].onmousedown = right;
      document.images[i].onmouseup = right;
    }
  }
}

function displayMessage(url)
{
	messageObj.setSource(url);
	messageObj.setCssClassMessageBox(false);
	messageObj.setSize(650,600);
	messageObj.setShadowDivVisible(true);	// Enable shadow for these boxes
	messageObj.display();
}

function closeMessage()
{
	messageObj.close();	
}