// JavaScript Document
//http:rajantimilsina.com.np

<!--gallery start-->

    
        var ctr=0;
        album=new Array();
        photo=new Array("images/gallery/001.jpg", "images/gallery/30092054054.jpg", "images/gallery/Image0464.jpg","images/gallery/Image0525.jpg","images/gallery/Image0552.jpg", "images/gallery/IMG_5573.jpg", "images/gallery/IMG_5575.jpg",  "images/gallery/IMG_5214.jpg", "images/gallery/14012010375.jpg", "images/gallery/20122009332.jpg", "images/gallery/20122009335.jpg", "images/gallery/Image013.jpg","images/gallery/pokhararingroadmap.jpg", "images/gallery/pkrstadium.jpg","images/gallery/Image091.jpg", "images/gallery/Nepal hilly highway.jpg", "images/gallery/IMG_3731.jpg", "images/gallery/devregion.jpg", "images/gallery/IMG_3800.jpg", "images/gallery/IMG_3809.jpg", "images/gallery/IMG_3871.jpg", "images/gallery/IMG_3878.jpg", "images/gallery/IMG_3852.jpg", "images/gallery/Image005.jpg");
        last=photo.length;
        for(i=0;i<last;i++)
        {
            album[i]=new Image();
            album[i].src=photo[i];
        }
        function a(val)
        {
            if(val=="f")
            {
                ctr=0;
            }
            else if(val=="l")
            {
                ctr=last-1;
            }
            else if(val=="n")
            {
                ctr=ctr+1;
                if(ctr>=last)
                {
                    ctr=last-1;
					alert ("Album ends here. Click 'Prev' or 'First' button to view the photos.");
                }
            }
            else if(val=="p")
            {
                ctr=ctr-1;
                if(ctr<0)
                {
                    ctr=0;
					alert ("Album starts from here. Click 'Next' or 'Last' button to view the photos.");
                }
            }
            document.img.src=album[ctr].src;
            
            function b()
            {
                if(ctr>last)
                {
                    ctr=0;
                    document.img.src=album[ctr].src;
                    ctr++;
                }
                else
                {
                    document.img.src=album[ctr].src;
                    ctr++;
                }
            }
        }

       
 <!--gallery end-->

//http:rajantimilsina.com.np

<!--contact feedback form validation start-->

function vfy_cform()
{
	if(document.contact_feedback.name.value=="")
	{
		alert("Type your name.");
	}
	
	else if(document.contact_feedback.address.value=="")
	{
		alert("Type your address.");
	}
	
	else if(document.contact_feedback.email.value=="")
	{
		alert("Type your valid email address.");
	}
	
	else if((document.contact_feedback.url.value=="") || (document.contact_feedback.url.value.indexOf(".") == -1 ))
	{
		alert("Type your url. eg. www.facebook.com/rajan");
	}
	
	else if(document.contact_feedback.feedback.value=="")
	{
		alert("Type your feedback.");
	}
	
	else 
	{
	alert("Thanks for your feedback.");
	}
}

//http:rajantimilsina.com.np

function email_chk()
{
	if((document.contact_feedback.email.value=="") || (document.contact_feedback.email.value.indexOf("@") == -1 ) || (document.contact_feedback.email.value.indexOf(".") == -1 ))
	{
		alert("Type your valid email address.");
	}
}

<!--contact feedback form validation end-->

//http:rajantimilsina.com.np

<!--blog comment box form validation start-->

function vfy_bform()
{
	if(document.blogcommentbox.name.value=="")
	{
		alert("Type your name.");
	}
	
	else if(document.blogcommentbox.comment.value=="")
	{
		alert("Type your comment.");
	}
	else 
	{
	alert("Thanks for your comment.");
	}
}

<!--blog comment box form validation end-->

//http:rajantimilsina.com.np
