﻿function historybk()
{
window.history.back();

}
/**Redirection to different page using post method**/
 function preview()
     {
        document.aspnetForm.method="post";
        document.aspnetForm.action="/app/Bike-Modification-Preview.aspx";
        document.aspnetForm.submit();
     }      
     function blog_preview()
     {
        document.aspnetForm.method="post";
        document.aspnetForm.action="/app/blog-Preview.aspx";
        document.aspnetForm.submit();
     } 
     function bikemodify_sbmit()
     {
        document.aspnetForm.method="post";
        document.aspnetForm.action="/app/Bike-Modify-submit.aspx";
        document.aspnetForm.submit();
     }
      function blogmodify_sbmit()
     { 
        document.aspnetForm.method="post";
        document.aspnetForm.action="/app/blog-submit.aspx";
        document.aspnetForm.submit();
     }
        function uploadimage()
        {   
            
           window.open("uploadimage.aspx",'','left=0, top=0, width=400,height=200,scrollbars=1')
         
        }
        
        function validatefav()
        {
       var npuserid=document.form1.fav_blogid.value;
       var userid=document.form1.reuserid.value;
       if(npuserid==userid)
       {
       alert("You cannot add your own blog");
       return;
       }
	   else
	   {
	   document.form1.method="post";
	   document.form1.action="/app/login.aspx?L2FwcC9mYXZvdXJpdGVzLmFzcHg.";
	  //document.form1.action="/app/login.aspx?redirect=/app/favourites.aspx";
	   document.form1.submit();	
	   }
       }
       
       /***Mouse over topic text in bulletin board***/
       function showlayer_msg(x)
	  {	 
	 
	 x=x.replace("'","").replace(Chr(13),"<br>").replace(Chr(10),"");       
	 if(document.all)
		{		
			xMousePos = window.event.x+document.body.scrollLeft;
	        yMousePos = window.event.y+document.body.scrollTop;
	        xMousePosMax = document.body.clientWidth+document.body.scrollLeft;
	        yMousePosMax = document.body.clientHeight+document.body.scrollTop;
			 
			
			document.all.msg1.style.pixelLeft=xMousePos+20
			document.all.msg1.style.pixelTop=yMousePos+7
     		msg1.innerHTML="<table cellpadding=1 cellspacing=1 bgcolor=#ACACAC width=550><tr bgcolor=#EEEEEE><td class=grey><table><tr><td><font class=grey>"+x+"</\font></\td></\tr></\table></\td></\tr></\table>"
			document.all["msg1"].style.visibility ="visible"
		}
		else
		{		
								
				xMousePosMax = document.body.clientWidth+document.body.scrollLeft;
	        	yMousePosMax = document.body.clientHeight - document.body.offsetTop;
				document.getElementById('msg1').style.left= tmpX + 15
				document.getElementById('msg1').style.top= tmpY + 10
				document.getElementById('msg1').style.visibility = "visible";
				document.getElementById("msg1").innerHTML="<table cellpadding=1 cellspacing=1 bgcolor=#ACACAC width=550><tr bgcolor=#EEEEEE><td class=grey><table><tr><td><font class=grey>"+x+"</\font></\td></\tr></\table></\td></\tr></\table>"	
				
			
		}
		
	}	
	
	function hidelayer_msg(x)
	   {
	   
	    if(document.all)
			document.all["msg1"].style.visibility ="hidden";
		else
			document.getElementById("msg1").style.visibility ="hidden";
	  }
	  //Bulletinboard reply
	  function bulletinreply()
     {
        document.aspnetForm.method="post";
        document.aspnetForm.action="/app/bulletinreply.aspx";
        document.aspnetForm.submit();
     }
     
     function assignval()
     {
     alert('hai...');
     }
     
    
     