function launchChat(winObj) 
{ 



var xOffSet = (screen.width - 225) / 2;
var yOffSet = (screen.height - 250) / 2;
var features = 'width=800,height=688,toolbar=0,left=100,top=0,directories=0,menubar=0,status=0,location=0,scrollbars=0,resizable=0';
var winName = 'v3chatrooms';

var chatUrl = 'http://select40plus.mywebservices.nl/v3chatrooms/index.php?uid='+userID+'&uname='+userName;

//var chatUrl = 'http://'+location.hostname+':8080/v3chatrooms/index.php?uid='+userID+'&uname='+userName;

if (winObj != null)
  {
    // the window has already been created, but did the user close it?
    // if so, then reopen it. Otherwise make it the active window.
    if (!winObj.closed) {
      winObj.focus();
      return winObj;
    } 
    // otherwise fall through to the code below to re-open the window
  }




myWin = window.open(chatUrl,winName,features);

function createCookie(name,value,days) {
	if (days) {
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
}

createCookie('login','login',1);
return myWin;
}
