//////////////////////CREATE BY Khairil//////////////
////////////////28/02/2011//////////////////////////


function go_yearpage(id,From,Where,search_for,cat_search,au_thor,sub_ject,pub_lish,typeid,lang_id,search_starty,search_endy){
	
	//alert(Where);
	$.post("year.php", {act: "getyear", yearpage: ""+id+"",yearview: "page",nav:"true",froM:""+From+"", wherE:""+Where+"",search_for:""+search_for+"",cat_search:""+cat_search+"",au_thor:""+au_thor+"",sub_ject:""+sub_ject+"",pub_lish:""+pub_lish+"",typeid:""+typeid+"",lang_id:""+lang_id+"",search_starty:""+search_starty+"",search_endy:""+search_endy+""}, function(data){	
		//alert(data);
		if(data.length > 0) {
			
		   ////////////////////////////DATA OUTPUT///////////////////////////
			document.getElementById('yearcontent').innerHTML = data;
			  
				}
			});
	
}

function hide_(type){
//alert(type);	
if(type=='type'){
	
	document.getElementById('act_type').style.display ="none";
	document.getElementById('show_type').innerHTML ="<a style=\"cursor: pointer\" onclick=\"show_('type')\"><img src=\"images/down.png\" width=\"10\" height=\"14\" border=\"0\"></a>";
	
	}else if(type=='subject'){
	
	document.getElementById('act_subject').style.display ="none";
	document.getElementById('show_subject').innerHTML ="<a style=\"cursor: pointer\" onclick=\"show_('subject')\"><img src=\"images/down.png\" width=\"10\" height=\"14\" border=\"0\"></a>";
	
	}else if(type=='year'){
	
	document.getElementById('act_year').style.display ="none";
	document.getElementById('show_year').innerHTML ="<a style=\"cursor: pointer\" onclick=\"show_('year')\"><img src=\"images/down.png\" width=\"10\" height=\"14\" border=\"0\"></a>";
	}else if(type=='publisher'){
	
	document.getElementById('act_publisher').style.display ="none";
	document.getElementById('show_publisher').innerHTML ="<a style=\"cursor: pointer\" onclick=\"show_('publisher')\"><img src=\"images/down.png\" width=\"10\" height=\"14\" border=\"0\"></a>";
	}else if(type=='language'){
	
	document.getElementById('act_language').style.display ="none";
	document.getElementById('show_language').innerHTML ="<a style=\"cursor: pointer\" onclick=\"show_('language')\"><img src=\"images/down.png\" width=\"10\" height=\"14\" border=\"0\"></a>";
	}else{}
	
	
}

function show_(type){
	
if(type=='type'){
	
	document.getElementById('act_type').style.display ="";
	document.getElementById('show_type').innerHTML ="<a style=\"cursor: pointer\" onclick=\"hide_('type')\"><img src=\"images/up.png\" width=\"10\" height=\"14\" border=\"0\"></a>";
	
	}else if(type=='subject'){
	
	document.getElementById('act_subject').style.display ="";
	document.getElementById('show_subject').innerHTML ="<a style=\"cursor: pointer\" onclick=\"hide_('subject')\"><img src=\"images/up.png\" width=\"10\" height=\"14\" border=\"0\"></a>";
	
	}else if(type=='year'){
	
	document.getElementById('act_year').style.display ="";
	document.getElementById('show_year').innerHTML ="<a style=\"cursor: pointer\" onclick=\"hide_('year')\"><img src=\"images/up.png\" width=\"10\" height=\"14\" border=\"0\"></a>";
	}else if(type=='publisher'){
		
		document.getElementById('act_publisher').style.display ="";
		document.getElementById('show_publisher').innerHTML ="<a style=\"cursor: pointer\" onclick=\"hide_('publisher')\"><img src=\"images/up.png\" width=\"10\" height=\"14\" border=\"0\"></a>";
	}else if(type=='language'){
		
		document.getElementById('act_language').style.display ="";
		document.getElementById('show_language').innerHTML ="<a style=\"cursor: pointer\" onclick=\"hide_('language')\"><img src=\"images/up.png\" width=\"10\" height=\"14\" border=\"0\"></a>";
	}else{}
	
	
}

function more_(type){

if(type=='publisher'){

document.getElementById('less_publisher').style.display ="none";		
document.getElementById('more_publisher').style.display ="";

}else if(type=='language'){

document.getElementById('less_language').style.display ="none";		
document.getElementById('more_language').style.display ="";		 
}else{}

	
}
function less_(type){

if(type=='publisher'){

document.getElementById('less_publisher').style.display ="";		
document.getElementById('more_publisher').style.display ="none";

}else if(type=='language'){

document.getElementById('less_language').style.display ="";		
document.getElementById('more_language').style.display ="none";
}else{}

}
