/*
Script Name: Your Computer Information
Author: Harald Hope, Website: http://TechPatterns.com/
Script Source URI: http://TechPatterns.com/downloads/browser_detection.php
Version 1.0.7
Copyright (C) 4 July 2008

This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Get the full text of the GPL here: http://www.gnu.org/licenses/gpl.txt

This script requires the Full Featured Browser Detection and the Javascript Cookies scripts
to function.
You can download them here.
http://TechPatterns.com/downloads/browser_detection_php_ar.txt
http://TechPatterns.com/downloads/javascript_cookies.txt
*/

/*
If your page is XHMTL 1 strict, you have to
put this code into a js library file or your
page will not validate
*/
function client_data(info)
{
	if (info == 'width')
	{
		width_height_html = '';
		width = (screen.width) ? screen.width:'';
		height = (screen.height) ? screen.height:'';
		width_height_html += width + " x " +
			height + "";
		(width && height) ? document.write(width_height_html):'';
		// pass to ajax.js, for dB inclusion
		insert(width_height_html);
	}
	else if (info == 'js' )
	{
		document.write('You have JavaScript enabled');
	}
	else if ( info == 'cookies' )
	{
		expires ='';
		Set_Cookie( 'cookie_test', 'it_worked' , expires, '', '', '' );
		//string = '<p class="yourComputer">Cookies</h4><p class="right-bar">';
		string = '';
		if ( Get_Cookie( 'cookie_test' ) )
		{
			string += 'You have cookies enabled</p><br />';
		}
		else {
			string += 'You have cookies disabled</p><br />';
		}
		document.write( string );
	}
}


