
function poptastic(url){

var newwindow;
newwindow=window.open(url,'name','height=400,width=200,left=20,top=20,toolbar=no,menubar=no,directories=no,location=no,scrollbars=no,status=no,resizable=yes,fullscreen=no');
if (window.focus) {newwindow.focus()}
}

 
function checkothervalue(the_form,selectname)
{	
	if (document.forms[the_form].elements[selectname]!=null)
	{
		var perlen=document.forms[the_form].elements[selectname].length;
		var perval=document.forms[the_form].elements[selectname].selectedIndex;		
		var tper="d"+selectname;

		if (document.all[tper]!=null)
		{	
			if (perval==perlen-1)
			{
				document.all[tper].style.visibility="visible";
				document.all[tper].style.display="";
			}
			else 
			{
				document.all[tper].style.visibility="hidden";	
				document.all[tper].style.display="none";
				//alert(document.all[tper].style.display);
			}
		}
	}
} 

function checkothervalueMultiple(the_form,selectname)
{	
	var mselectname = selectname+"[]";
	var form = document.forms[the_form];
	var length = form.elements[mselectname].length;
	if (form.elements[mselectname]!=null)
	{
		var tper="d"+selectname;			
		if (document.all[tper]!=null)
		{
			if (form.elements[mselectname][length-1].selected)
			{				
				document.all[tper].style.visibility="visible";
				document.all[tper].style.display="";
			}
			else
			{
				document.all[tper].style.visibility="hidden";	
				document.all[tper].style.display="none";
			}					
		}		
	}
} 
 
function setCheckboxes(the_form, do_check)
{
    var elts      = document.forms[the_form].elements;
    var elts_cnt  = elts.length;
	
    for (var i = 0; i < elts_cnt; i++) {
        elts[i].checked = do_check;
    } // end for

    return true;
} // end of the 'setCheckboxes()' function


var win = "width=400,height=500,left=100,top=100,copyhistory=no,directories=no,menubar=no,location=no,resizable=no,scrollbars=yes";
function get_gallery(id_prof)
{
   window.open("photo_gallery.html?memID="+id_prof,'html','top=100,left=120, width=700, height=600, menubar=0,scrollbars=1,status=0,resizable=1',win);
}


function checksetother(the_form,checkname)
{	
	var tper="d"+checkname;

	if (document.forms[the_form].elements[checkname].checked==true)
		document.all[tper].style.visibility="visible";
	else document.all[tper].style.visibility="hidden";
}


function launchIM ()
{
	var win = "width=600,height=450,left=100,top=100,copyhistory=no,directories=no,menubar=no,location=no,resizable=no,scrollbars=no";
	window.open("imchat/",'html',win);
	return false;
}

function launchTellFriend ()
{
    var win = "width=300,height=300,left=100,top=100,copyhistory=no,directories=no,menubar=no,location=no,resizable=no,scrollbars=yes";
    window.open("tellfriend.php",'html',win);
    return false;
}

function launchTellFriendProfile ( sID )
{
    var win = "width=300,height=300,left=100,top=100,copyhistory=no,directories=no,menubar=no,location=no,resizable=no,scrollbars=yes";
    window.open("tellfriend.php?ID="+sID,'html',win);
    return false;
}

function ShowShowHide ( show_name, show_name2, hide_name )
{
    if (hide_name) hide_name.style.display = 'none';
    if (show_name) show_name.style.display = 'inline';
    if (show_name2) show_name2.style.display = 'inline';
}

function ShowHideHide ( show_name, hide_name, hide_name2 )
{
    if (hide_name) hide_name.style.display = 'none';
    if (hide_name2) hide_name2.style.display = 'none';
    if (show_name) show_name.style.display = 'inline';
}


