function ph(phname,phid)
{
	var path=phname;
	var pid=phid;
	document.getElementById(pid).src=path
}
function ph_display(phname,phid,path_150_image)
{
	var path=phname;
	var pid=phid;
	var pid_ph = pid+"_hidden150";
	var path_150 = path_150_image;
	document.getElementById(pid).src=path;
	document.getElementById(pid_ph).value=path_150;
}

function launchIC( userID, destinationUserID ) {
	var popupWindowTest = window.open("/cgi-bin/icnew.cgi?strDestinationMemberID=" + destinationUserID, "ICWindow_" + replaceAlpha(userID) + "_" + replaceAlpha(destinationUserID), "width=360,height=420,toolbar=0,directories=0,menubar=0,status=0,location=0,scrollbars=0,resizable=0" );
	if(popupWindowTest == null) {
		if(confirm( "Your popup blocker stopped an InstantCommunicator window from opening. Please disable it and then click 'ok'" ) )	{
			launchIC( userID, destinationUserID );
		}
	}
}

function replaceAlpha( strIn ) {
	var strOut = "";
	for( var i = 0 ; i < strIn.length ; i++ ) {
		var cChar = strIn.charAt(i);
		if( ( cChar >= 'A' && cChar <= 'Z' ) || ( cChar >= 'a' && cChar <= 'z' ) || ( cChar >= '0' && cChar <= '9' ) ) {
			strOut += cChar;
		} else {
			strOut += "_";
		}
	}
	return strOut;
}

function dynamic_popup(url,w,h,s,r) {
	var dyn_pop=window.open(url, "","top=0,left=0,menubar=no,toolbar=no,location=no,resizable="+r+",width="+w+",height="+h+",status=no,scrollbars="+s+",titlebar=yes;");
	dyn_pop.focus();
}
