/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
*	Pops Media
*	Author:
*	Description: 
*	Module: Tinipet website
*	Date started:
*	Date updated: 
*	Module Version Number: 1.0.0
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
var wt_Lib = Class.create();
wt_Lib.prototype = 
{
	active: 1,
    initialize: function()
    {
        
    },
	
	/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
	* Author:
	* Function Name:
	* Description:
	* Input:
	* Output:
	+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
	wt_GetPagingPictureOfHomePage: function(cateID,pagerecord,page)
    {
        var url = 'wt_GetPagingPicture.htm';
        new Ajax.Request(url,
		{
				method:'post',
				parameters:{cateID:cateID,pagerecord:pagerecord,page:page},
				onSuccess: function(Trans)
				{
					var data = Trans.responseText;
					$("listPicture_lib").innerHTML = data;
                }
			}
		);
    },
	
	/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
	* Author:
	* Function Name:
	* Description:
	* Input:
	* Output:
	+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
    wt_GetPagingPictureOfLibraryPage: function(CateID,Page)
	{
        $("library_paging").innerHTML = "<img src='../../tmpl/img/icon_loading.gif'></img>";
        var url = 'wt_GetPictureOfLibraryPage.htm';
        new Ajax.Request(url,
		{
				method:'post',
				parameters:{CateID:CateID,Page:Page},
				onSuccess: function(Trans)
				{
					var data = Trans.responseText.split("<||>");
					$("library_content_main").innerHTML = data[0];
					$("library_paging").innerHTML = data[1];
					//active tab
					$("cattitle_"+CateID).setStyle({color: '#900'});
					if(oLib.active != 0 && oLib.active != CateID)
					{
						$("cattitle_"+oLib.active).setStyle({color: '#135E23'});
					}
					oLib.active = CateID;
					$("catname").innerHTML = $("cattitle_"+CateID).innerHTML;
					//active tab
				}
			}
		);
	},
	
	/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
	* Author:
	* Function Name:
	* Description:
	* Input:
	* Output:
	+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
    wt_Change_banner: function()
	{
		$("banner_container").setStyle({display: 'none'});
		//window.location.href='../../htm/user/home.htm';
	}	
};
