<!--
// Read a page's GET URL variables and return them as an associative array.
function getUrlVars()
{
    var vars = [], hash;
    var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');

    for(var i = 0; i < hashes.length; i++)
    {
        hash = hashes[i].split('=');
        vars.push(hash[0]);
        vars[hash[0]] = hash[1];
        //alert(hash[0] + hash[1]);
    }

    return vars;
}
var url_vars = getUrlVars();
//alert(url_vars.length);
//var i=url_vars.length;
for (var i in url_vars) {
	//alert(url_vars['webcam']);	
}
var serverEngine = "php";
var projectRoot = "http://www.morbosos.com/flashcoms/";
var query = "?webcam=true";

var communicatorWindows = new Object();
var messengerWindows = new Object();
var countBlocks = 0;

function openVideochatWindow(roomId, uid, langId)
{
    if(!roomId) roomId = '';
    if(!uid) uid = 'Test';
	if(!langId) langId = '';
    var name = 'videochat_' + uid;
    var url = makeUrl('videochat') + '?roomId=' + roomId + '&uid=' + uid + '&langId=' + langId;
    var my_url ="http://www.morbosos.com/flashcoms/videochat/server/php/videochat.php";
    window.open(url, name, "width=765, height=560, scrollbars=yes");
}

function makeUrl(application)
{
    return projectRoot + application + '/server/' + serverEngine + '/' + application + '.' + serverEngine + query;
}

//if (url_vars['webcam'] == 'true') location.href =  makeUrl('videochat') + '?roomId=' + roomId + '&uid=' + uid + '&langId=' + langId;;
// -->

