
var uri = new Object();
window.onload=getURL( uri );
 
function getURL( uri ) { 
	setKeyword( "keyword" );
	var p = location.href.indexOf( '\/' );  
        s = location.href.substring( p + 1 ); 
        p = p + 1 + s.indexOf( '\/' );
        s = location.href.substring( p + 1 );  
        p = p + 1 + s.indexOf( '\/' );         
	uri.dir = location.href.substring( 0, p ); 
	return uri;	 
}
function setKeyword( name ) { 
    parm = new Array;
	value = new Array;
	var beg = "" + location.href; 	 
	beg = beg.substring( beg.indexOf( name ) );
	parm = beg.split( '&' );
	for ( i = 0; i < parm.length; i++ ) {
	   value[ i ] = parm[ i ].split( '=' ); 
	   	if ( value[ i ][ 0 ] == name ) {                
 		createDBFXCookie( "keyword", value[ i ][ 1 ] ); 
		}
	}
}
function createDBFXCookie( 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=/";
}
function getDate() {
	var d = new Date();
	var year = "" + d.getFullYear();		 
	year = year.substring(( year.length - 2 ), year.length ); 
	var month = "" + ( d.getMonth() + 1 );
	if ( month.length == 1 ) {
		month = "0" + month;
	}
	var data = "" + d.getDate();
	if ( data.length == 1 ) {
		data = "0" + data;
	}		 
	return ( year + month + data );
}
function getDBFXCookie( name ) {
    var dc = document.cookie;
    var prefix = name + "=";
    var begin = dc.indexOf( "; " + prefix );
    if ( begin == -1 ) {
        begin = dc.indexOf( prefix );
        if ( begin != 0 ) return null;
    } else {
        begin += 2;
    }
    var end = document.cookie.indexOf( ";", begin );
    if ( end == -1 ) {
        end = dc.length;
    }   
    return unescape( dc.substring( begin + prefix.length, end ));
}   
function openForceDBFX() {
var b = window.open('http://server.iad.liveperson.net/hc/18889694/?cmd=file&file=visitorWantsToChat&site=18889694&byhref=1&SESSIONVAR!skill=Arabic','chatw','width=472,height=420', 'menubar=no,status=no,toolbar=no,dependent=yes,alwaysRaised=yes');
b.focus();
}
function openForceClick2() {
// alert ( "uri.dir = " + uri.dir );              
var b = window.open('http://server.iad.liveperson.net/hc/18889694/?cmd=file&file=visitorWantsToChat&site=18889694&byhref=1&SESSIONVAR!skill=Arabic','chatw','width=472,height=420', 'menubar=no,status=no,toolbar=no,dependent=yes,alwaysRaised=yes');
b.focus();
}
function openForceClick3() {
// alert ( "uri.dir" + uri.dir );              
var b = window.open('http://server.iad.liveperson.net/hc/18889694/?cmd=file&file=visitorWantsToChat&site=18889694&byhref=1&SESSIONVAR!skill=Arabic','chatw','width=472,height=320', 'menubar=no,status=no,toolbar=no,dependent=yes,alwaysRaised=yes');
b.focus();                                            
}