

		function RecordDeviceInfo(connectionspeed)	
		{
				var xmlhttp = null;
				//alert("start");
				
				if (window.XMLHttpRequest)
				{// code for IE7+, Firefox, Chrome, Opera, Safari
					xmlhttp=new XMLHttpRequest();
				}
				else
				{// code for IE6, IE5
					xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
				}
		
				var CurrentURL = "Device.php";
								
				xmlhttp.onreadystatechange=function()
				{
					if (xmlhttp.readyState==4 && xmlhttp.status==200)
					{
						var Content = xmlhttp.responseText;
						updateDevice(connectionspeed);
						//document.write("Device details Added Successfully!!!");		
						//document.write(Content);		
					}
				}
				
				xmlhttp.open("GET",CurrentURL,true);
				xmlhttp.send(null);
		}
		
		function updateDevice(connectionspeed){
			var screenRes = client_data('width');
			var playerVersion = swfobject.getFlashPlayerVersion(); // returns a JavaScript object
			var flashVersion = playerVersion.major + "." + playerVersion.minor + "." + playerVersion.release;

			postData = 'fv='+encodeURIComponent(flashVersion)+'&sr='+encodeURIComponent(screenRes)+'&ks='+encodeURIComponent(connectionspeed);
			//alert(postData);
			$.ajax({
				url : 'postDevice.php',
				type : 'post',
				data : postData,
				success : function( result ) {
					//alert(result);
					//$('#div1').html($('#content1', result).html());

					//$(document).ready(function(){
						//
					//});
				}
			});
		}
		
		function RecordIPInfo(pg)	
		{
				var xmlhttp = null;
				//alert("start");
				
				if (window.XMLHttpRequest)
				{// code for IE7+, Firefox, Chrome, Opera, Safari
					xmlhttp=new XMLHttpRequest();
				}
				else
				{// code for IE6, IE5
					xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
				}
		
				var CurrentURL = "RecordIPInfo.php?pg="+pg;
				//alert(CurrentURL);		
				
				xmlhttp.onreadystatechange=function()
				{
					if (xmlhttp.readyState==4 && xmlhttp.status==200)
					{
						var Content = xmlhttp.responseText;
						//document.write("Device details Added Successfully!!!");		
						//document.write(Content);		
					}
				}
				//alert("going to get " + CurrentURL);
				
				xmlhttp.open("GET",CurrentURL,true);
				xmlhttp.send(null);
		}
		
		
				
   
