function postdata(datasource,destid,id)
{
 
try
 {
 
var str=id.split("+");
var param="";  

for(i=0;i<str.length;i++)
 {
	id = document.getElementById(str[i]).value; 
    param += str[i]+"="+id+"&" ;
	
     }

 var xmlobj='false'
if( window.XMLHttpRequest )  //browsers other than ie 5.5 - 6.0.
{
    xmlobj=new XMLHttpRequest()
}
else
	 {
      try
		 {
          xmlobj=new ActiveXObject( "Microsoft.XMLHTTP" )  
		 }
        catch(e)
		 {
           alert("Error:Browser:"+e);
		 }
	  }
}
catch(e)
                 {
                 alert("Error:0"+e);
				}
	
	try
	{
	
	
	
	if ( xmlobj )
	{
		
		var url=datasource;
		var data = "file=" + url + "&"+param; 
	 
		
		try
		{
		xmlobj.open ( "POST",url,true )
	  	xmlobj.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
        xmlobj.setRequestHeader("Content-length", data.length);
        xmlobj.setRequestHeader("Connection", "close");
		
		}
		catch(e)
		{alert(e);
		}
		xmlobj.onreadystatechange=function()
		{
		
			if ( xmlobj.readyState==4 && xmlobj.status==200 )
			{
		          
			      document.getElementById(destid).innerHTML= xmlobj.responseText;
                  document.getElementById(str[0]).value=""; 
				 
			
			}
		
		
		}
		xmlobj.send(data);
	}
	

	}
	catch(e)
	{
alert("Error:2"+e);
	}
}

//***************************************End of Getdata function****************************************************



function setLogin ()
{
  
document.getElementById("video").innerHTML="<img src='video.gif'>";
	 try
 {
  

 var xmlobj='false'
if( window.XMLHttpRequest )  //browsers other than ie 5.5 - 6.0.
{
    xmlobj=new XMLHttpRequest()
}
else
	 {
      try
		 {
          xmlobj=new ActiveXObject( "Microsoft.XMLHTTP" )  
		 }
        catch(e)
		 {
           alert("Error:Browser:"+e);
		 }
	  }
}
catch(e)
                 {
                 alert("Error:0"+e);
				}
	
	try
	{
	
	
	
	if ( xmlobj )
	{
		
		var url="loginsession.php"+"?sid="+Math.random()
		
		try
		{
		xmlobj.open ( "GET",url,true )
	  	}
		catch(e)
		{alert(e);}
		xmlobj.onreadystatechange=function()
		{
		


if (xmlobj.status==200 )
			{
window.location="http://videos.twitsnaps.com/KConvert.jsp";
	  
         
			}
			if ( xmlobj.readyState==4 && xmlobj.status==200 )
			{
		     
			
			window.location="http://videos.twitsnaps.com/KConvert.jsp";
	  
			
			}
		
		
		}
		xmlobj.send ( null )
	}
	

	}
	catch(e)
	{
alert("Error:2"+e);
	}
}

