


		var pageindex=1;
		var np=1;
		//habib
		function newMember(){
		       //document.location.replace("u-register.php");
			   showLoadDiv();
			   document.f.hi.name="subtab";
			document.f.hi.value=5;
			document.f.hj.name="maintab";
			document.f.hj.value=3;
			document.f.submit();
		}
		function dopay(){
		       //document.location.replace("u-register.php");
			   showLoadDiv();
			   document.f.hi.name="subtab";
			document.f.hi.value=5;
			document.f.hj.name="maintab";
			document.f.hj.value=3;
			document.f.py.name="pay";
			document.f.py.value="payment";
			document.f.submit();
		}
		//habibend
		//var ^&%^#xxx=29;
		function lostPassword(){
		        //document.location.replace("lostpassword.u4u");
		}

		function x2(){
		        //POP1
		        if (!js_vstate){
		        if (js_LOGGED_IN){
				is = Math.floor(Math.random() * 10) + 1;
				if (is > 3){
					i = (Math.floor(Math.random() * 7) + 1) - 1;
					pop1img.src = js_POPDIR + "/5000/" + i + ".jpg";
					pop1href.href= js_POPDIR + "/5000/" + i + ".u4u?uuSzT=3-0&uuProf=sebt";
				}else{
					i = 10000 + Math.floor(Math.random() * 302) + 1;
					pop1img.src = js_POPDIR + "/2002/" + i + ".gif";
					pop1href.href= js_POPDIR + "/2002/" + i + ".u4u?uuSzT=3-0&uuProf=sebt";
				}
   			}
			//POP2
			is = Math.floor(Math.random() * 10) + 1;
			if (is > 6){
				i = 10000 + Math.floor(Math.random() * 332) + 1;
				pop2img.src = js_POPDIR + "/1003/" + i + ".gif";
				pop2href.href= js_POPDIR + "/1003/" + i + ".u4u?uuSzT=3-0&uuProf=sebt";
			}else if (is > 2){
				i = 10000 + Math.floor(Math.random() * 899) + 1;
				pop2img.src = js_POPDIR + "/1002/" + i + ".gif";
				pop2href.href= js_POPDIR + "/1002/" + i + ".u4u?uuSzT=3-0&uuProf=sebt";
			}else{
				i = 10000 + Math.floor(Math.random() * 21) + 1;
				pop2img.src = js_POPDIR + "/1004/" + i + ".gif";
				pop2href.href= js_POPDIR + "/1004/" + i + ".u4u?uuSzT=3-0&uuProf=sebt";
			}

			// POP3
			is = Math.floor(Math.random() * 10) + 1;
			if (is > 6){
				i = 10000 + Math.floor(Math.random() * 121) + 1;
				pop3img.src = js_POPDIR + "/1000/" + i + ".gif";
				pop3href.href= js_POPDIR + "/1000/" + i + ".u4u?uuSzT=3-0&uuProf=sebt";
			}else if (is > 3){
				i = 10000 + Math.floor(Math.random() * 47) + 1;
				pop3img.src = js_POPDIR + "/1001/" + i + ".gif";
				pop3href.href= js_POPDIR + "/1001/" + i + ".u4u?uuSzT=3-0&uuProf=sebt";
			}else{
				i = 10000 + Math.floor(Math.random() * 15) + 1;
				pop3img.src = js_POPDIR + "/1005/" + i + ".gif";
				pop3href.href= js_POPDIR + "/1005/" + i + ".u4u?uuSzT=3-0&uuProf=sebt";
			}

			//POPDIR4
			is = Math.floor(Math.random() * 10) + 1;
			if (is > 3){
				i = (Math.floor(Math.random() * 7) + 1) - 1;
				pop4img.src = js_POPDIR + "/5000/" + i + ".jpg";
				pop4href.href= js_POPDIR + "/5000/" + i + ".u4u?uuSzT=3-0&uuProf=sebt";
			}else{
				i = 10000 + Math.floor(Math.random() * 302) + 1;
				pop4img.src = js_POPDIR + "/2002/" + i + ".gif";
				pop4href.href= js_POPDIR + "/2002/" + i + ".u4u?uuSzT=3-0&uuProf=sebt";
			}
			}

		}

		function selectMainTab(index){
			showLoadDiv();
			document.f.hf.name="maintab";
			document.f.hf.value=index;
			document.f.submit();
		}

		function selectSubTab(index){
			showLoadDiv();
			//alert(quick_mainTab)
			if(quick_mainTab!=0)
			{
			selectQiuckLink(quick_mainTab,index)
			}
			else
			{
			document.f.hf.name="subtab";
			document.f.hf.value=index;
			document.f.hg.name="maintab";
			document.f.hg.value=js_mainTab;
			document.f.submit();
			}
			
		}
///////////////habib
function selectQiuckLink(mindex,sindex){
			//showLoadDiv();
			document.f.hf.name="subtab";
			document.f.hf.value=sindex;
			document.f.hg.name="maintab";
			document.f.hg.value=mindex;
			document.f.hh.name="quicklink";
       		document.f.hh.value=1;
			document.f.submit();
			
		}
//////////////////
	  function selectFont(f, t){
        showLoadDiv();
		document.f.hi.name="set_font";
        document.f.hi.value=1;
        document.f.hj.name="font_type";
        document.f.hj.value=t;
        document.f.hf.name="font_size";
        document.f.hf.value=f;
        document.f.hg.name="maintab";
        document.f.hg.value=2;
        document.f.hh.name="subtab";
        document.f.hh.value=1;
        document.f.submit();
    }

		function selectFont1(f, t){
        //alert("habib");
		showLoadDiv();
		document.f.hi.name="set_font";
        document.f.hi.value=1;
        document.f.hj.name="font_type";
        document.f.hj.value=t;
        document.f.hf.name="font_size";
        document.f.hf.value=f;
        document.f.hg.name="maintab";
        document.f.hg.value=2;
        document.f.hh.name="subtab";
        document.f.hh.value=1;
		document.f.ts.name="tahsison";
        document.f.ts.value=1;
        document.f.submit();
    }



		function selectStatic(name){
			showLoadDiv();
			document.f.hf.name="static";
			document.f.hf.value=1;
			document.f.hg.name="pname";
			document.f.hg.value=name;
			document.f.submit();
		}
	
		function xss(index) {selectSinf(index); }
		function selectSinf(index){
			 showLoadDiv();
			document.f.hf.name="genre";
			document.f.hf.value=index;
			document.f.submit();
		}

		function xsa(index) {selectAuthor(index); }
		function selectAuthor(index){
			showLoadDiv();
			document.f.hf.name="author";
			document.f.hf.value=index;
			document.f.submit();
		}

		function selectAExtToc(index){
			showLoadDiv();
			document.f.hf.name="aexttoc";
			document.f.hf.value=index;
			document.f.submit();
		}

		/*
		function selectAExtWeb(index, index2){
			document.f.hf.name="aext";
			document.f.hf.value=index;
			document.f.hg.name="bpage";
			document.f.hg.value=index2;
			document.f.submit();
		}
		*/


		function xsb(index) { selectBook(index); }
		function selectBook(index){
			showLoadDiv();
			document.f.hf.name="book";
			document.f.hf.value=index;
			document.f.submit();
		}

		function xsbt(index) {selectBookToc(index); }
		function selectBookToc(index){
			showLoadDiv();
			document.f.hf.name="booktoc";
			document.f.hf.value=index;
			document.f.submit();
		}

		function xsbp(index1, index2) { selectBookPg(index1,index2); }
		function selectBookPg(index1,index2){
			showLoadDiv();
			document.f.hf.name="book";
			document.f.hf.value=index1;
			document.f.hg.name="chapter";
			document.f.hg.value=index2;
			document.f.submit();
		}

		function selectBook2(index){
			showLoadDiv();
			document.f.hf.name="book";
			document.f.hf.value=index;
			document.f.hg.name="author";
			if ((js_book_no) && (js_author_no)){
			document.f.hg.value=js_author_no;
			}
			document.f.submit();
		}

		function selectChapter(index){
			showLoadDiv();
			document.f.hf.name="chapter";
			document.f.hf.value=index;
			document.f.hg.name="book";
			if ((js_book_no) && (js_author_no)){
				document.f.hg.value= js_book_no ;
				document.f.hh.name="author";
				document.f.hh.value= js_author_no ;
			}
			document.f.hi.name="subtab";
			document.f.hi.value=1;
			document.f.hj.name="maintab";
			document.f.hj.value=2;
			document.f.submit();
		}

		function page_uaccount(){

			//document.u_a.hf.value="xyz";
			document.uacct.submit();
		}

		function rtInfo(){
			
			document.f.hi.name="subtab";
			document.f.hi.value=4;
			document.f.hj.name="maintab";
			document.f.hj.value=5;
			document.f.submit();
		}

		function rtRabta(){
			
			document.f.hi.name="subtab";
			document.f.hi.value=3;
			document.f.hj.name="maintab";
			document.f.hj.value=5;
			document.f.submit();
		}

		function rtHelp(){
			
			document.f.hi.name="subtab";
			document.f.hi.value=5;
			document.f.hj.name="maintab";
			document.f.hj.value=5;
			document.f.submit();
		}

		function rtLogout(){
		
		    //<input type="submit" name="logout" value="Logout">
			document.f.hj.name="logout";
			document.f.hj.value="Logout";
			document.f.submit();

			//document.f2.submit();
		}


		function rtSearch(){
		}

		function vote(x){
			if (js_vstate==2){
				hideVoteDiv();
					document.getElementById("pageviewframe").src="displaypage.u4u?skin=" + js_skinPath + "&author=" +  js_author_no + "&book=" + js_book_no + "&chapter=" + js_chapter_no + "&lpath=" + js_listPath + "&cId=" + js_classId + "&fsize=" + js_fontSize + "&ftype=" + js_fontType + "&pageid=" + pageindex + "&vote=" + x;
				}
		}

		function displayAara(index){
		        document.getElementById("pageviewframe").src="++/listain/common/aara-page1+gif";
		}
		
		function sendToFriend(){

		}



		function resetNavBar(){
					return;
					for (i=1; i<=js_max_noofpages; ++i){
						document.getElementById("a[" + i + "]").className="ut4";
						document.getElementById("b[" + i + "]").className="ut4";
					}
				}

	function _gotoPage2(pageindex, param)
		{
		if (param)
				{
				//alert(pageindex + " _gotoPage2 param=" + param);
				document.getElementById("pageviewframe").src="displaypage.u4u?skin=" + js_skinPath + "&author=" +  js_author_no + "&book=" + js_book_no + "&chapter=" + js_chapter_no + "&lpath=" + js_listPath + "&cId=" + js_classId + "&fsize=" + js_fontSize + "&ftype=" + js_fontType + "&pageid=" + pageindex + "&" + param;
				
				}
		else
				document.getElementById("pageviewframe").src="displaypage.u4u?skin=" + js_skinPath + "&author=" +  js_author_no + "&book=" + js_book_no + "&chapter=" + js_chapter_no + "&lpath=" + js_listPath + "&cId=" + js_classId + "&fsize=" + js_fontSize + "&ftype=" + js_fontType + "&pageid=" + pageindex;
		}

	function _gotoPage(pageindex)
		{
				document.getElementById("pageviewframe").src="displaypage.u4u?skin=" + js_skinPath + "&author=" +  js_author_no + "&book=" + js_book_no + "&chapter=" + js_chapter_no + "&lpath=" + js_listPath + "&cId=" + js_classId + "&fsize=" + js_fontSize + "&ftype=" + js_fontType + "&pageid=" + pageindex;
		}

	function _gotoPage_dol(pageindex)
		{
		if (js_vstate == 2) 
			{
			_gotoPage(pageindex);

			} 
		else 
			{
			if (js_vstate < 2) 
				{
				_gotoPage_list(pageindex);
				}
			}
		}



		
		function addToFavourite(){
			if (js_vstate==2){
			
			_gotoPage2(pageindex, "&addFav=1");

			}
		}


	function x_gotoPage2(pageindex, param)
		{
		if (param)
				{
				document.getElementById("pageviewframe").src="displaypage.u4u?skin=" + js_skinPath + "&author=" +  js_author_no + "&book=" + js_book_no + "&chapter=" + js_chapter_no + "&lpath=" + js_listPath + "&cId=" + js_classId + "&fsize=" + js_fontSize + "&ftype=" + js_fontType + "&pageid=" + pageindex + "&" + param;
					}
		else
				document.getElementById("pageviewframe").src="displaypage.u4u?skin=" + js_skinPath + "&author=" +  js_author_no + "&book=" + js_book_no + "&chapter=" + js_chapter_no + "&lpath=" + js_listPath + "&cId=" + js_classId + "&fsize=" + js_fontSize + "&ftype=" + js_fontType + "&pageid=" + pageindex;
		}

	function _gotoPage(pageindex)
		{
				document.getElementById("pageviewframe").src="displaypage.u4u?skin=" + js_skinPath + "&author=" +  js_author_no + "&book=" + js_book_no + "&chapter=" + js_chapter_no + "&lpath=" + js_listPath + "&cId=" + js_classId + "&fsize=" + js_fontSize + "&ftype=" + js_fontType + "&pageid=" + pageindex+ "&tahsis=" + js_tahsis;
		}

	function goto_list_g(argClass, id )
		{
		var pageindex = 1;
		x = "displaylistpage.u4u?skin=" + js_skinPath + "&lpath=" + js_listPath + "&cId=" + argClass + "&gId=" + id + "&fsize=" + js_fontSize + "&fType=" + js_fontType +"&pId=" + pageindex;
		alert(x);
		document.getElementById("pageviewframe").src="displaylistpage.u4u?skin=" + js_skinPath + "&lpath=" + js_listPath + "&cId=" + argClass + "&gId=" + id + "&fsize=" + js_fontSize + "&fType=" + js_fontType +"&pId=" + pageindex;
		}

	function xx_gotoPage_list(pageindex)
		{
		document.getElementById("pageviewframe").src="displaylistpage.u4u?skin=" + js_skinPath + "&lpath=" + js_listPath + "&cId=" + js_classId + "&gId=" + js_genre_no + "&fsize=" + js_fontSize + "&fType=" + js_fontType +"&pId=" + pageindex;
		}

	function _gotoPage_list(pageindex)
		{
		//x ="displaylistpage.u4u?skin=" + js_skinPath + "&lpath=" + js_listPath + "&cId=" + js_classId + "&gId=" + js_genre_no + "&fsize=" + js_fontSize + "&fType=" + js_fontType +"&pId=" + pageindex; alert(x);
		
		if (js_mainTab==2 && js_subTab==6){
			if(js_se=="")
			{
			displaySearchPage(js_query);
			}
			else
			{
				displaySearchPage1(js_page_no);
				displaySearchPageRight(js_query);				
			}
		}else{
		document.getElementById("pageviewframe").src="displaylistpage.u4u?skin=" + js_skinPath + "&lpath=" + js_listPath + "&cId=" + js_classId + "&gId=" + js_genre_no + "&fsize=" + js_fontSize + "&fType=" + js_fontType +"&pId=" + pageindex;
		}}

	function _gotoPage_list_bottom(pageindex, bot)
		{
       	if (bot == 1) { isBottom="&#bottom"}else{isBottom = "" }
		document.getElementById("pageviewframe").src="displaylistpage.u4u?skin=" + js_skinPath + "&lpath=" + js_listPath + "&cId=" + js_classId + "&gId=" + js_genre_no + "&fsize=" + js_fontSize + "&fType=" + js_fontType +"&pId=" + pageindex + isBottom;
		}

	function _gotoPage_dol(pageindex)
	{
		if (js_vstate == 2) 
			{
			_gotoPage(pageindex);

			} 
		else 
			{
			if (js_vstate < 2) 
				{
				_gotoPage_list(pageindex);
				}
			}
	}

	function _gotoPage_dol_bottom(pageindex, bot)
	{
		if (js_vstate == 2) 
			{
			_gotoPage(pageindex);

			} 
		else 
			{
			if (js_vstate < 2) 
				{
				_gotoPage_list_bottom(pageindex, bot);
				}
			}
	}

	function _gotoPage_dola(pageindex)
		{
		if (js_vstate == 2) 
			{
				 _gotoPage(pageindex);
			} 
		else 
			{
			if (js_vstate < 2) 
				{
				if (js_page_no==0)
					{
					document.getElementById("pageviewframe").src="displayauthorpage.u4u?skin=" + js_skinPath + "&author=" + js_author_no + "&fapic=" + js_fapic;
					}
				else

					_gotoPage_list(pageindex);
				}
			}
		}

		function gotoFirstPage()
		{
			resetNavBar();
			pageindex=1;
					_gotoPage_dol(pageindex);


					setPagingBold(pageindex);
					updateSlider(pageindex);
		}




		function gotoLastPage(){
				pageindex=js_noofpages ;

				 _gotoPage_dol(pageindex);

					setPagingBold(pageindex);
					updateSlider(pageindex);
				}

				function gotoPage(y){
        				pageindex=y;

 				_gotoPage_dola(pageindex);


					setPagingBold(y);
					updateSlider(y);
				}

				function selectPage_noslider(x,y){
        				pageindex=y;

 					_gotoPage_dol(pageindex);
					setPagingBold(pageindex);
					//updateSlider(pageindex);
				}


				function selectPage(x,y){
        				pageindex=y;

 					_gotoPage_dol(pageindex);
					setPagingBold(pageindex);
					updateSlider(pageindex);
				}

				function selectNextPage(){

					if (pageindex <  js_noofpages ) {

						pageindex++;
	YAHOO.log("selectNextPage=" + pageindex, "window");
					}


					_gotoPage_dol(pageindex);

					setPagingBold(pageindex);
					updateSlider(pageindex);
				}

				function selectPrevPage()
				{

				     	resetNavBar();
					if (pageindex > 1) {
						--pageindex;

					_gotoPage_dol(pageindex);

					setPagingBold(pageindex);
					updateSlider(pageindex);
					}
				}

				
				function xslp(x,y,z) { selectListPg(x,y,z); }
				function selectListPg(x,y,z)
				{
				//alert("SelectListPg" + x + ", " + y + ", " + z);
        				pageindex=y;

					_gotoPage_dol_bottom(pageindex, z);

					setPagingBold(pageindex);
					updateSlider(pageindex);
				}


	function updateSlider(np)
	{
	/*
    if (typeof yourvar != 'undefined') // Any scope
    if (window['varname'] != undefined) // Global scope
    if (window['varname'] != void 0) // Old browsers
	if (horizontalSlider)
	*/
    if (typeof horizontalSlider != 'undefined') // Any scope
		{
		setSliderToPage(np);
		}
	/////////////alert(np);
	}

	function setPagingBold(np)
	{
	


						var pitem = document.getElementById("page_num");
						if (pitem)
							{
							pitem.innerHTML = np;
							}
	}

		function displayAuthorPage() //not used??
		{
		if (js_vstate==1)
			{
			document.getElementById("pageviewframe").src="displayauthorpage.u4u?skin=" + js_skinPath + "&author=" + js_author_no + "&fapic=" + js_fapic;
			}
		}


		function displayRatingPage()
		{
			if (js_vstate==0){
				document.getElementById("pageviewframe").src="displayratingpage.u4u?skin=" + js_skinPath;
			}
		}

		function displayNewPage()
		{
			if (js_vstate==0){
				document.getElementById("pageviewframe").src="displaynewpage.u4u?skin=" + js_skinPath;
			}
		}


		function displayHistoryPage(x)
		{
		//alert(x);
		        var time = new Date();
		        var month = time.getMonth()+1;
		        var year = time.getYear();
			var his_date = year + "-" + month + "-" + x;
			if (js_vstate==3){
				document.getElementById("pageviewframe").src="animatedhistory.u4u?skin=" + js_skinPath + "&his_date=" + his_date;
				//document.getElementById("pageviewframe").src="displayhistorypage.u4u?skin=" + js_skinPath + "&his_date=" + his_date;
			}
		}

		function jsDisplayPage(p, key1, value1)
		{
				 //xx = p + "?skin=" + js_skinPath + "& " + key1 + "=" + value1; alert("jsDisplayPage::= " + xx);
				document.getElementById("pageviewframe").src= p + "?skin=" + js_skinPath;
		}

		function jsDisplayPage2(p, key1, value1)
		{
				xx = p + "?skin=" + js_skinPath + "& " + key1 + "=" + value1;
				//alert("jsDisplayPage2::= " + xx);
				document.getElementById("pageviewframe").src= p + "?skin=" + js_skinPath + "& " + key1 + "=" + value1;
		}

		function displayFavouritePage(x)
		{
			if (js_vstate==3){
				document.getElementById("pageviewframe").src="displayfavouritepage.u4u?skin=" + js_skinPath + "&fav_cat=" + x;
			}
		}

		function displaySkinPage(x)
		{
			if (js_vstate==3){
				document.getElementById("pageviewframe").src="displayskinpage.u4u?skin=" + js_skinPath + "&skin_cat=" + x;
			}
		}

		function displayFontPage(x){
			if (js_vstate==3){
				document.getElementById("pageviewframe").src="displayfontpage.u4u?skin=" + js_skinPath + "&font_type=" + x;
			}
		}

		function displaySearchPage(x){
				document.getElementById("pageviewframe").src="http://202.125.140.133/se/htdocs/doSearch.php?skin=" + js_skinPath + "&fsize=" + js_fontSize + "&ftype=" + js_fontType + "&q=" + x;
		}

		function displaySearchPageRight(x){
				document.getElementById("searchframe").src="http://202.125.140.133/se/htdocs/doSearchR.php?skin=" + js_skinPath + "&fsize=" + js_fontSize + "&ftype=" + js_fontType + "&q=" + x;
		}
  
		function displaySearchPage1(x){
			//alert(js_coords);
				document.getElementById("pageviewframe").src="displaypage.u4u?skin=" + js_skinPath + "&author=" +  js_author_no + "&book=" + js_book_no + "&chapter=" + js_chapter_no + "&lpath=" + js_listPath + "&cId=" + js_classId + "&fsize=" + js_fontSize + "&ftype=" + js_fontType + "&pageid=" + x;
		}
  
		function displayUserAccount(){
				document.getElementById("pageviewframe").src="u-userm.u4u?skin=" + js_skinPath + "&fsize=" + js_fontSize + "&ftype=" + js_fontType + "&opna=" + dummy;
		}
		//habib
		function displayUserAccountpay(){
			
				document.getElementById("pageviewframe").src="u-payment.u4u?skin=" + js_skinPath + "&fsize=" + js_fontSize + "&ftype=" + js_fontType;
		}
function displayUserAccount1(){
				document.getElementById("pageviewframe").src="u-register.u4u?skin=" + js_skinPath + "&fsize=" + js_fontSize + "&ftype=" + js_fontType;
		}
		///habib end
