<!--
// copyright OSI Codes, PHP Live! Support
// http://www.osicodes.com
function dounique() { var date = new Date() ; return date.getTime() ; }
var tracker_refresh = 10000 ; // 1000 = 1 second
var btn = 433966 ;
var do_tracker_flag_433966 = 1 ;
var start_tracker = dounique() ;
var time_elapsed ;
var refer = escape( document.referrer ) ;
var phplive_base_url = 'http://chat.wsex.com/phplive' ;
var initiate = chat_opened = 0 ;
var pullimage_433966_0 = new Image ;
var date = new Date() ;
var unique = dounique() ;
var chat_width = 450 ;
var chat_height = 360 ;
var url = escape( location.toString() ) ;
var phplive_image_433966_0 = "http://chat.wsex.com/phplive/image.php?l=wsex&x=1&deptid=0&page="+url+"&unique="+unique+"&refer="+refer+"&text=" ;

if(window.location.protocol == "https:") {
	phplive_image_433966_0 = "https://chat.wsex.com/phplive/image.php?l=wsex&x=1&deptid=0&page="+url+"&unique="+unique+"&refer="+refer+"&text=" ;
}


var scriptpad = "" ;
var ns=(document.layers);
var ie=(document.all);
var w3=(document.getElementById && !ie);

/********************************************/
/***** proactive image settings: begin ******/
var ProactiveDiv ;
var browser_width ;
var backtrack = 0 ;
var isclosed = 0 ;
var repeat = 1 ;
var timer = 20 ;
var halt = 0 ;

// browser detection
var browser_ua = navigator.userAgent.toLowerCase() ;
var browser_type, tempdata ;
function phplive_detect_ua( text )
{
	stringposition = browser_ua.indexOf(text) + 1 ;
	tempdata = text ;
	return stringposition ;
}

if (  phplive_detect_ua( "firefox" ) )
{
	chat_width = 461 ;
	chat_height = 360 ;
}

// write external style here.. it won't work if we put it directly in the DIV
style = "<style type=\"text/css\">" ;
style += "<!--" ;
style += "#ProactiveSupport_433966 {visibility:hidden; position:absolute; height:1; width:1; top:0; left:0;}" ;
style += "-->" ;
style += "</style>" ;
document.write( style ) ;
if (ie||w3)
	browser_width = document.body.offsetWidth ;
else
	browser_width = window.outerWidth ;

function toggleMotion( flag )
{
	if ( flag )
		halt = 1 ;
	else
		halt = 0 ;
}

function initializeProactive_433966()
{

	if(!ns && !ie && !w3) return ;
	if(ie)		ProactiveDiv = eval('document.all.ProactiveSupport_433966.style') ;
	else if(ns)	ProactiveDiv = eval('document.layers["ProactiveSupport_433966"]') ;
	else if(w3)	ProactiveDiv = eval('document.getElementById("ProactiveSupport_433966").style') ;

	if (ie||w3)
		ProactiveDiv.visibility = "visible" ;
	else
		ProactiveDiv.visibility = "show" ;

	backtrack = 0 ;
	isclosed = 0 ;
	repeat = 1 ;
	moveIt(20) ;
}

function moveIt( h )
{
	if (ie)
	{
		documentHeight = document.body.offsetHeight/2+document.body.scrollTop-20 ;
		documentWidth = document.body.offsetWidth ;
	}
	else if (ns)
	{
		documentHeight = window.innerHeight/2+window.pageYOffset-20 ;
		documentWidth = window.innerWidth ;
	}
	else if (w3)
	{
		documentHeight = self.innerHeight/2+window.pageYOffset-20 ;
		documentWidth = self.innerWidth ;
	}
	ProactiveDiv.top = documentHeight-100 ;
	ProactiveDiv.left = documentWidth/2 ; // mod

	ProactiveDiv.left = h ;
	if ( h > ( browser_width - 350 ) )
		backtrack = 1 ;
	if ( backtrack && repeat && !halt )
		h -= 2 ;
	else if ( !backtrack && repeat && !halt )
		h += 2 ;

	if ( halt )
	{
		setTimeout("moveIt("+h+")",timer) ;
	}
	else if ( ( !backtrack || ( backtrack && ( h >= 20 ) ) ) && ( ( ProactiveDiv.visibility == "visible" ) || ( ProactiveDiv.visibility == "show" ) ) && repeat && !isclosed )
		setTimeout("moveIt("+h+")",timer) ;
	else if ( !isclosed )
	{
		backtrack = 0 ;
		repeat = 0 ;
		setTimeout("moveIt("+h+")",timer) ;
	}
	else
	{
		// incase it is closed during when it's off the page, set the position
		// back to the page so the horizontal scrollbars disappear (IE only)
		ProactiveDiv.left = h ;
	}
}

function DoClose(){
	if (ie||w3)
		ProactiveDiv.visibility = "hidden" ;
	else
		ProactiveDiv.visibility = "hide" ;
	isclosed = 1 ;
	halt = 0 ;
}

/********************************************/
/********************************************/


function launch_support_433966_0()
{
	var request_url_433966_0 = "http://chat.wsex.com/phplive/request.php?l=wsex&x=1&deptid=0&page="+url ;
	newwin = window.open( request_url_433966_0, unique, 'scrollbars=no,menubar=no,resizable=0,location=no,screenX=50,screenY=100,width='+chat_width+',height='+chat_height+'' ) ;
	newwin.focus() ;
	DoClose() ;
}

function WriteChatDiv()
{
	output = "<div id=\"ProactiveSupport_433966\">" ;
	output += "<table cellspacing=0 cellpadding=0 border=0>" ;
	output += "<tr><td align=right><table cellspacing=0 cellpadding=0 border=0><tr><td bgColor=#E1E1E1></td></tr></table></td></tr>" ;
	output += "<tr><td align=center>" ;
	output += "</td></tr></table>" ;
	output += "</div>" ;
	document.writeln( output ) ;

	if(ie)		ProactiveDiv = eval('document.all.ProactiveSupport_433966.style') ;
	else if(ns)	ProactiveDiv = eval('document.layers["ProactiveSupport_433966"]') ;
	else if(w3)	ProactiveDiv = eval('document.getElementById("ProactiveSupport_433966").style') ;

	if (ie||w3)
		ProactiveDiv.visibility = "hidden" ;
	else
		ProactiveDiv.visibility = "hide" ;
}

var status_image_433966_0 = "<a href='JavaScript:void(0)' onMouseOver='window.status=\"Click for Live Support\"; return true;' onMouseOut='window.status=\"\"; return true;' OnClick='launch_support_433966_0()'><img src="+phplive_image_433966_0+" border=0 alt='Click for Live Support'></a>" ;
document.write( status_image_433966_0 ) ;

if ( !phplive_loaded )
{
	WriteChatDiv() ;
}
var phplive_loaded = 1 ;
//-->

