function gallery()
{
    var date = new Date();
	var url = "gallery.php";
	var params = "t="+date.getSeconds();
    xmlhttp=GetXmlHttpObject();
	xmlhttp.open("GET", url+"?"+params, true);
	xmlhttp.onreadystatechange = function() 
	{
		if(xmlhttp.readyState == 4 && xmlhttp.status == 200) 
		{
			document.getElementById("proCentre").innerHTML=xmlhttp.responseText;
		}
	}
	xmlhttp.send(null);	
}
function album()
{
    var date = new Date();
	var url = "albums.php";
	var params = "t="+date.getSeconds();
    xmlhttp=GetXmlHttpObject();
	xmlhttp.open("GET", url+"?"+params, true);
	xmlhttp.onreadystatechange = function() 
	{
		if(xmlhttp.readyState == 4 && xmlhttp.status == 200) 
		{
			document.getElementById("proCentre").innerHTML=xmlhttp.responseText;
		}
	}
	xmlhttp.send(null);	
}

function createAlbum()
{
	var currentDate = new Date()
	var url = "createAlbum.php";
	var al = document.getElementById('txtAlbum').value;
/*	for (i=0;i<document.form.chkAlbum.length;i++) 
	{ 
	      if (document.form.chkAlbum[i].checked) 
	      { 
	            var chk = document.form.chkAlbum[i].value; 
	      } 
	}
*/
	var params = "a="+al+"&t="+currentDate.getSeconds();

    xmlhttp=GetXmlHttpObject();
	xmlhttp.open("POST", url, true);
	//Send the proper header information along with the request
	xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	xmlhttp.setRequestHeader("Content-length", params.length);
	xmlhttp.setRequestHeader("Connection", "close");
	xmlhttp.onreadystatechange = function() 
	{
		//Call a function when the state changes.
		if(xmlhttp.readyState == 4 && xmlhttp.status == 200) 
		{
			document.getElementById('albumArea').innerHTML = xmlhttp.responseText;
			//document.getElementById('txtAlbum').value = "";
		}
	}
	xmlhttp.send(params);	
}

function deleteAlbum(al)
{
	var q = confirm("Delete this album and contents?");
	if (q)
	{
		var currentDate = new Date()
		var url = "deleteAlbum.php";
		var params = "a="+al+"&t="+currentDate.getSeconds();
	
	    xmlhttp=GetXmlHttpObject();
		xmlhttp.open("POST", url, true);
		xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
		xmlhttp.setRequestHeader("Content-length", params.length);
		xmlhttp.setRequestHeader("Connection", "close");
		xmlhttp.onreadystatechange = function() 
		{
			if(xmlhttp.readyState == 4 && xmlhttp.status == 200) 
			{
				document.getElementById('albumArea').innerHTML = xmlhttp.responseText;
			}
		}
		xmlhttp.send(params);	
	}
}

function addPhotos(value)
{
    var date = new Date();
	var url = "addPhotos.php";
	var al = value;
	var params = "a="+al+"&t="+date.getSeconds();
    xmlhttp=GetXmlHttpObject();
	xmlhttp.open("POST", url, true);
	xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	xmlhttp.setRequestHeader("Content-length", params.length);
	xmlhttp.setRequestHeader("Connection", "close");
	xmlhttp.onreadystatechange = function() 
	{
		if(xmlhttp.readyState == 4 && xmlhttp.status == 200) 
		{
			document.getElementById("albumArea").innerHTML=xmlhttp.responseText;
		}
	}
	xmlhttp.send(params);	
}

function marketplace()
{
    var date = new Date();
	var url = "marketplace.php";
	var params = "t="+date.getSeconds();
    xmlhttp=GetXmlHttpObject();
	xmlhttp.open("GET", url+"?"+params, true);
	xmlhttp.onreadystatechange = function() 
	{
		if(xmlhttp.readyState == 4 && xmlhttp.status == 200) 
		{
			document.getElementById("proCentre").innerHTML=xmlhttp.responseText;
		}
	}
	xmlhttp.send(null);	
}

function updateAlbum(a)
{
    var date = new Date();
	var url = "photoList.php";
	var params = "a="+a+"&t="+date.getSeconds();
    xmlhttp=GetXmlHttpObject();
	xmlhttp.open("GET", url+"?"+params, true);
	xmlhttp.onreadystatechange = function() 
	{
		if(xmlhttp.readyState == 4 && xmlhttp.status == 200) 
		{
			document.getElementById("albumPhotos").innerHTML=xmlhttp.responseText;
			document.getElementById('imgLoader').style.visibility = "hidden"; 
		}
	}
	xmlhttp.send(null);	
}

function viewAlbum(a)
{
    var date = new Date();
	var url = "photoList.php";
	var params = "a="+a+"&t="+date.getSeconds();
    xmlhttp=GetXmlHttpObject();
	xmlhttp.open("GET", url+"?"+params, true);
	xmlhttp.onreadystatechange = function() 
	{
		if(xmlhttp.readyState == 4 && xmlhttp.status == 200) 
		{
			document.getElementById("proCentre").innerHTML=xmlhttp.responseText;
		}
	}
	xmlhttp.send(null);	
}
function viewPhoto(p)
{
	if(typeof(window.innerWidth) == 'number')
	{ 
        availHeight = window.innerHeight; 
        availWidth = window.innerWidth; 
    }
	else if(document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight))					
	{ 
        availHeight = document.documentElement.clientHeight; 
        availWidth = document.documentElement.clientWidth; 
    }
	else if(document.body && (document.body.clientWidth || document.body.clientHeight))
	{ 
        availHeight = document.body.clientHeight; 
        availWidth = document.body.clientWidth; 
    }
    var fader = document.getElementById('fader'); 
    fader.style.left="0";
    fader.style.top="0"; 	 
    fader.style.border="0px"; 
    fader.style.background="black"; 
    fader.style.position="absolute"; 
    fader.style.zIndex="900"; 
    fader.style.height = availHeight+"px";
    fader.style.width = availWidth+"px";
    fader.style.display="block";
    fader.style.position="fixed";	

    var indicatorWidth = 600; 
    var indicatorHeight = 480; 
    var left = (availWidth/2) - (indicatorWidth/2); 
    var top = (availHeight/2) - (indicatorHeight/2); 

    var element = document.getElementById('fadePhoto'); 
    element.style.border="5px solid ffa500"; 
    element.style.position="absolute"; 
    element.style.zIndex="999"; 
    element.style.top=top+"px"; 
    element.style.left=left+"px"; 
    element.style.display="block";
    element.style.position="fixed";

    var date = new Date();
	var url = "photo.php";
	var params = "p="+p+"&t="+date.getSeconds();
    xmlhttp=GetXmlHttpObject();
	xmlhttp.open("GET", url+"?"+params, true);
	xmlhttp.onreadystatechange = function() 
	{
		if(xmlhttp.readyState == 4 && xmlhttp.status == 200) 
		{
			document.getElementById("fadePhoto").innerHTML=xmlhttp.responseText;
		}
	}
	xmlhttp.send(null);	
}
function fadeMenu(v)
{
	if(v == 1)
	{
		document.getElementById('fadeMenu').style.display = "block";
	}
	else
	{
		document.getElementById('fadeMenu').style.display = "none";		
	}
}
function closePhoto()
{
    var fader = document.getElementById('fader').style.display = "none"; 
    var fader = document.getElementById('fadePhoto').style.display = "none"; 	
}
function uploadPhotos()
{
	document.getElementById('imgLoader').style.visibility = "visible"; 
}

function showMessage(messageID)
{
	document.getElementById('currentMessageID').value = messageID;
	
	var date = new Date();
			   
	xmlhttp=GetXmlHttpObject()
	
    if (xmlhttp==null)
    {
        alert ("Browser does not support HTTP Request");
        return;
    }
		
	var url = "showMessage.php";
	    
    var parameters = "id="+messageID+"&t="+date.getSeconds();

    xmlhttp.open("GET",url+"?"+parameters,false);
    xmlhttp.send(null);
    document.getElementById('messagePane').innerHTML = xmlhttp.responseText;
}
function showcreatenewmessage(username)
{
	document.getElementById('currentMessageID').value = "";
	showcreatemessage(username);
}
function showcreatemessage(username, title)
{
 
	showFader();		

	if(typeof(window.innerWidth) == 'number')
	{ 
        availHeight = window.innerHeight; 
        availWidth = window.innerWidth; 
    }
	else if(document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight))					
	{ 
        availHeight = document.documentElement.clientHeight; 
        availWidth = document.documentElement.clientWidth; 
    }
	else if(document.body && (document.body.clientWidth || document.body.clientHeight))
	{ 
        availHeight = document.body.clientHeight; 
        availWidth = document.body.clientWidth; 
    }
    
    var indicatorWidth = 540; 
    var indicatorHeight = 190; 
    var left = (availWidth/2) - (indicatorWidth/2); 
    var top = (availHeight/2) - (indicatorHeight/2); 

    var element = document.getElementById('postmessage'); 
    element.style.border="5px solid #ffa500"; 
    element.style.background="#ffffff"; 
    element.style.position="absolute"; 
    element.style.zIndex="999"; 
    element.style.top=top+"px"; 
    element.style.left=left+"px"; 
    element.style.display="block";
    element.style.position="fixed";
    
    document.getElementById('messageTo').value = username;
    if(document.getElementById('messageTo').value == "undefined")
    {
		document.getElementById('messageTo').value = "";
	}
	document.getElementById('messageSubject').value = "RE: " + title;
	if(document.getElementById('messageSubject').value == "RE: undefined")
    {
		document.getElementById('messageSubject').value = "";
	}
	try
	{
			document.getElementById('rid').value = document.getElementById('currentMessageID').value;
	}	
	catch(ex){}

}

function showFader()
{
	if(typeof(window.innerWidth) == 'number')
	{ 
        availHeight = window.innerHeight; 
        availWidth = window.innerWidth; 
    }
	else if(document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight))					
	{ 
        availHeight = document.documentElement.clientHeight; 
        availWidth = document.documentElement.clientWidth; 
    }
	else if(document.body && (document.body.clientWidth || document.body.clientHeight))
	{ 
        availHeight = document.body.clientHeight; 
        availWidth = document.body.clientWidth; 
    }	
    var element = document.getElementById('fader'); 
    element.style.border="0px"; 
    element.style.background="black"; 
    element.style.position="absolute"; 
    element.style.zIndex="900"; 
//    element.style.top=top+"px"; 
//    element.style.left=left+"px"; 
    element.style.height = availHeight+"px";
    element.style.width = availWidth+"px";
    element.style.display="block";
    element.style.position="fixed";

}

function closemessage()
{

	document.getElementById('fader').style.display = "none";
	
	document.getElementById('postmessage').style.display = "none";
	document.getElementById('currentMessageID').value = "";
}

function savemessage()
{
	//var text =  encodeURI(tinyMCE.get('messagepost').getContent());
	var text =  tinyMCE.activeEditor.getContent();
	var to = document.getElementById('messageTo').value;
	var subject = document.getElementById('messageSubject').value;
	
	valid = true;
	document.getElementById("subjectError").style.display = "none";
	document.getElementById("toError").style.display = "none";
	if(to == "")
	{
		valid = false;		
		document.getElementById("toError").style.display = "block";
	}
	if(subject == "")
	{
		valid = false;

		document.getElementById("subjectError").style.display = "block";
		
	}

	var replyID = document.getElementById('currentMessageID').value;
	try
	{
		document.getElementById('rid').value = replyID;
	}	
	catch(ex){}
		
    var date = new Date();
    var xmlhttp;

    xmlhttp=GetXmlHttpObject()

    if (xmlhttp==null)
    {
        alert ("Browser does not support HTTP Request");
        return;
    }
	if(valid == true)
	{
//		var url="savemessage.php";
    
//    	for(i=0; i<100; i++)
//    	{
//			text = text.replace("<p>&nbsp;</p>", "");
//		}
    	

    
//	    var parameters = "rid="+replyID+"&post="+text+"&to="+to+"&subject="+subject+"&t="+date.getSeconds();
	
//	    xmlhttp.open("GET",url+"?"+parameters,false);
//	    xmlhttp.send(null);
//	xmlhttp.open("POST", url, true);
//		xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
//		xmlhttp.setRequestHeader("Content-length", parameters.length);
//		xmlhttp.setRequestHeader("Connection", "close");


//		xmlhttp.send(parameters);
	    //document.getElementById("addpost").innerHTML=xmlhttp.responseText;
alert("Message Sent!");
		//alert(xmlhttp.responseText);
//		location.reload(true);
		return true;
	}
	else
	{
		return false;	
	}
    
}

function deletemessage(forumID)
{	
	var messageID = forumID;

    var date = new Date();
    var xmlhttp;
	if(confirm("Are you sure you want to delete this message?"))
	{
		xmlhttp=GetXmlHttpObject()
	
	    if (xmlhttp==null)
	    {
	        alert ("Browser does not support HTTP Request");
	        return;
	    }
	
	    var url="deletemessages.php";
	    
	    var parameters = "did="+messageID+"&t="+date.getSeconds();

	    xmlhttp.open("GET",url+"?"+parameters,false);
	    xmlhttp.send(null);
	
	    alert(xmlhttp.responseText);
		location.reload(true);
	}
    
}

function editAlbum(a)
{
    var date = new Date();
	var url = "albumEdit.php";
	var params = "a="+a+"&t="+date.getSeconds();
    xmlhttp=GetXmlHttpObject();
	xmlhttp.open("GET", url+"?"+params, true);
	xmlhttp.onreadystatechange = function() 
	{
		if(xmlhttp.readyState == 4 && xmlhttp.status == 200) 
		{
			document.getElementById("albumArea").innerHTML=xmlhttp.responseText;
		}
	}
	xmlhttp.send(null);	
}
function delMP(l)
{
	var q = confirm("Are you sure you want to remove this listing?");
	if (q)
	{
		var currentDate = new Date()
		var url = "deleteMP.php";
		var params = "l="+l+"&t="+currentDate.getSeconds();
	
	    xmlhttp=GetXmlHttpObject();
		xmlhttp.open("POST", url, true);
		xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
		xmlhttp.setRequestHeader("Content-length", params.length);
		xmlhttp.setRequestHeader("Connection", "close");
		xmlhttp.onreadystatechange = function() 
		{
			if(xmlhttp.readyState == 4 && xmlhttp.status == 200) 
			{
				document.getElementById('mp').innerHTML = xmlhttp.responseText;
			}
		}
		xmlhttp.send(params);	
	}	
}
function rPho(p)
{
	var q = confirm("Are you sure you want to remove this image?");
	if (q)
	{
		var currentDate = new Date()
		var url = "photoDel.php";
		var params = "p="+p+"&t="+currentDate.getSeconds();
	
	    xmlhttp=GetXmlHttpObject();
		xmlhttp.open("POST", url, true);
		xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
		xmlhttp.setRequestHeader("Content-length", params.length);
		xmlhttp.setRequestHeader("Connection", "close");
		xmlhttp.onreadystatechange = function() 
		{
			if(xmlhttp.readyState == 4 && xmlhttp.status == 200) 
			{
				document.getElementById('albumArea').innerHTML = xmlhttp.responseText;
			}
		}
		xmlhttp.send(params);	
	}
}

function closePost()
{

	document.getElementById('fader').style.display = "none";
	document.getElementById('postnote').style.display = "none"; 
	tinyMCE.activeEditor.setContent('');	
}

function showAddressList()
{
	if(typeof(window.innerWidth) == 'number')
	{ 
        availHeight = window.innerHeight; 
        availWidth = window.innerWidth; 
    }
	else if(document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight))					
	{ 
        availHeight = document.documentElement.clientHeight; 
        availWidth = document.documentElement.clientWidth; 
    }
	else if(document.body && (document.body.clientWidth || document.body.clientHeight))
	{ 
        availHeight = document.body.clientHeight; 
        availWidth = document.body.clientWidth; 
    }
    
    var indicatorWidth = 540; 
    var indicatorHeight = 190; 
    var left = (availWidth/2) - (indicatorWidth/2); 
    var top = (availHeight/2) - (indicatorHeight/2); 

    var element = document.getElementById('addresslist'); 

    element.style.border="5px solid #ffa500";

    element.style.background="#ffffff"; 
    element.style.position="absolute"; 
    element.style.zIndex="999"; 
    element.style.top=top+"px"; 
    element.style.left=left+"px"; 
    element.style.display="block";
    element.style.position="fixed";
}

function recipientsSelected(checkbox)
{
 	if(checkbox.checked == true)
 	{
		recipients.push(checkbox.value);	
	}
	else
	{
		for(i=0; i<recipients.length; i++)
		{
			if(recipients[i] == checkbox.value)
			{
				recipients.splice(i, 1)
			}
		}
	}	
}

function parseRecipientList()
{
 	var recipientList = "";
	for(i=0; i<recipients.length; i++)
	{
		recipientList += "; " + recipients[i];
	}
	document.getElementById('addresslist').style.display = "none";
	
	document.getElementById('messageTo').value = recipientList.substring(2);
}

function deletePost(id, p, limit)
{
 	if(confirm('Delete this post?'))
 	{
		var date = new Date();
	    var xmlhttp;
	
	    xmlhttp=GetXmlHttpObject()
	
	    if (xmlhttp==null)
	    {
	        alert ("Browser does not support HTTP Request");
	        return;
	    }
	
	    var url="deletepost.php";
	    
	    var parameters = "id="+id+"&t="+date.getSeconds();
	
	    xmlhttp.open("GET",url+"?"+parameters,false);
	    xmlhttp.send(null);

	    //document.getElementById("addpost").innerHTML=xmlhttp.responseText;
	
		//location.reload(true);
		var url="refreshMyBoard.php";
	    
	    if(p != "")
		{
			var parameters = "p="+p+"&l="+limit+"&t="+date.getSeconds();	
		}
		else
		{
		    var parameters = "l="+limit+"&t="+date.getSeconds();	
		}
		
	    xmlhttp.open("GET",url+"?"+parameters,false);
	    xmlhttp.send(null);

	    document.getElementById("proCentre").innerHTML=xmlhttp.responseText;
	}
}

function deleteSubPost(id, p, limit)
{
 	if(confirm('Delete this post?'))
 	{
		var date = new Date();
	    var xmlhttp;
	
	    xmlhttp=GetXmlHttpObject()
	
	    if (xmlhttp==null)
	    {
	        alert ("Browser does not support HTTP Request");
	        return;
	    }
	
	    var url="deletesubpost.php";
	    
	    var parameters = "id="+id+"&t="+date.getSeconds();
	
	    xmlhttp.open("GET",url+"?"+parameters,false);
	    xmlhttp.send(null);
	
	    //document.getElementById("addpost").innerHTML=xmlhttp.responseText;
	
		//location.reload(true);
		var url="refreshMyBoard.php";
	    
	   	if(p != "")
		{
			var parameters = "p="+p+"&l="+limit+"&t="+date.getSeconds();	
		}
		else
		{
		    var parameters = "l="+limit+"&t="+date.getSeconds();	
		}
	
	    xmlhttp.open("GET",url+"?"+parameters,false);
	    xmlhttp.send(null);
	    document.getElementById("proCentre").innerHTML=xmlhttp.responseText;
		
	}
}
function showMore(limit, p)
{
	var date = new Date();
    var xmlhttp;

    xmlhttp=GetXmlHttpObject()

    if (xmlhttp==null)
    {
        alert ("Browser does not support HTTP Request");
        return;
    }
    
    var url="refreshMyBoard.php";
	limit = limit + 4;
	if(p != "")
	{
		var parameters = "p="+p+"&l="+limit+"&t="+date.getSeconds();	
	}
	else
	{
	    var parameters = "l="+limit+"&t="+date.getSeconds();	
	}

    xmlhttp.open("GET",url+"?"+parameters,false);
    xmlhttp.send(null);
    
    document.getElementById("proCentre").innerHTML=xmlhttp.responseText;
		
}
function viewMP(i)
{
	if(typeof(window.innerWidth) == 'number')
	{ 
        availHeight = window.innerHeight; 
        availWidth = window.innerWidth; 
    }
	else if(document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight))					
	{ 
        availHeight = document.documentElement.clientHeight; 
        availWidth = document.documentElement.clientWidth; 
    }
	else if(document.body && (document.body.clientWidth || document.body.clientHeight))
	{ 
        availHeight = document.body.clientHeight; 
        availWidth = document.body.clientWidth; 
    }
    
    var indicatorWidth = 600; 
    var indicatorHeight = 410; 
    var left = (availWidth/2) - (indicatorWidth/2); 
    var top = (availHeight/2) - (indicatorHeight/2); 

    var element = document.getElementById('viewer'); 
    element.style.border="5px solid ffa500"; 
    element.style.background="#ffffff"; 
    element.style.position="absolute"; 
    element.style.zIndex="999"; 
    element.style.top=top+"px"; 
    element.style.left=left+"px"; 
    element.style.display="block";
    element.style.position="fixed";
	fade();
    var date = new Date();
	var url = "../marketplace/view.php";
	var params = "i="+i+"&s=p&t="+date.getSeconds();
    xmlhttp=GetXmlHttpObject();
	xmlhttp.open("GET", url+"?"+params, true);
	xmlhttp.onreadystatechange = function() 
	{
		//Call a function when the state changes.
		if(xmlhttp.readyState == 4 && xmlhttp.status == 200) 
		{
			document.getElementById('viewer').innerHTML = xmlhttp.responseText;
		}
	}
	xmlhttp.send(null);	
}

function fade()
{
	if(typeof(window.innerWidth) == 'number')
	{ 
        availHeight = window.innerHeight; 
        availWidth = window.innerWidth; 
    }
	else if(document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight))					
	{ 
        availHeight = document.documentElement.clientHeight; 
        availWidth = document.documentElement.clientWidth; 
    }
	else if(document.body && (document.body.clientWidth || document.body.clientHeight))
	{ 
        availHeight = document.body.clientHeight; 
        availWidth = document.body.clientWidth; 
    }
    var fader = document.getElementById('fader'); 
    fader.style.left="0";
    fader.style.top="0"; 	 
    fader.style.border="0px"; 
    fader.style.background="black"; 
    fader.style.position="absolute"; 
    fader.style.zIndex="900"; 
    fader.style.height = availHeight+"px";
    fader.style.width = availWidth+"px";
    fader.style.display="block";
    fader.style.position="fixed";	
}
function closeView()
{
    var fader = document.getElementById('fader').style.display = "none"; 
    var fader = document.getElementById('viewer').style.display = "none"; 
}
function sendBuddyRequest(id)
{	
	var date = new Date();
			  
	xmlhttp=GetXmlHttpObject()
	
    if (xmlhttp==null)
    {
        alert ("Browser does not support HTTP Request");
        return;
    }
		
	var url = "sendBuddyRequest.php";
	    
    var parameters = "p="+id+"&t="+date.getSeconds();

    xmlhttp.open("GET",url+"?"+parameters,false);
    xmlhttp.send(null);
    alert(xmlhttp.responseText);
}
function delArticle(l)
{
	var q = confirm("Are you sure you want to remove this article?");
	if (q)
	{
		var currentDate = new Date()
		var url = "deleteArticle.php";
		var params = "l="+l+"&t="+currentDate.getSeconds();
	
	    xmlhttp=GetXmlHttpObject();
		xmlhttp.open("POST", url, true);
		xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
		xmlhttp.setRequestHeader("Content-length", params.length);
		xmlhttp.setRequestHeader("Connection", "close");
		xmlhttp.onreadystatechange = function() 
		{
			if(xmlhttp.readyState == 4 && xmlhttp.status == 200) 
			{
				document.getElementById('mp').innerHTML = xmlhttp.responseText;
			}
		}
		xmlhttp.send(params);	
	}	
}
function delEvent(l)
{
	var q = confirm("Are you sure you want to remove this event?");
	if (q)
	{
		var currentDate = new Date()
		var url = "deleteEvent.php";
		var params = "l="+l+"&t="+currentDate.getSeconds();
	    xmlhttp=GetXmlHttpObject();
		xmlhttp.open("POST", url, true);
		xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
		xmlhttp.setRequestHeader("Content-length", params.length);
		xmlhttp.setRequestHeader("Connection", "close");
		xmlhttp.onreadystatechange = function() 
		{
			if(xmlhttp.readyState == 4 && xmlhttp.status == 200) 
			{
				document.getElementById('mp').innerHTML = xmlhttp.responseText;
			}
		}
		xmlhttp.send(params);	
	}	
}
function icount()
{
	var c = document.getElementById('txtCount').value;
	c++;
	document.getElementById('txtCount').value = c;
}
