function checkscript(elem){
	document.getElementById(elem).className=document.getElementById(elem).className+"script";
}

function searchopen(){
	if(document.getElementById('div.search').style.width!="560px"){
		document.getElementById('div.search').style.width="560px";
		if(document.getElementById('div.preview').style.width=="500px"){
			previewopen();
		}
		if(document.getElementById('div.sortby').style.width=="400px"){
			sortbyopen();
		}
		if(document.getElementById('div.perpage').style.width=="560px"){
			perpageopen();
		}
	}else{
		document.getElementById('div.search').style.width="110px";
	}
}

function previewopen(){
	if(document.getElementById('div.preview').style.width!="500px"){
		document.getElementById('div.preview').style.width="500px";
		document.getElementById('div.preview').style.height="200px";
		if(document.getElementById('div.search').style.width=="560px"){
			searchopen();
		}
		if(document.getElementById('div.sortby').style.width=="400px"){
			sortbyopen();
		}
		if(document.getElementById('div.perpage').style.width=="560px"){
			perpageopen();
		}
	}else{
		document.getElementById('div.preview').style.width="110px";
		document.getElementById('div.preview').style.height="70px";
	}
}

function sortbyopen(){
	if(document.getElementById('div.sortby').style.width!="400px"){
		document.getElementById('div.sortby').style.width="400px";
		document.getElementById('div.sortby').style.height="170px";
		if(document.getElementById('div.preview').style.width=="500px"){
			previewopen();
		}
		if(document.getElementById('div.search').style.width=="560px"){
			searchopen();
		}
		if(document.getElementById('div.perpage').style.width=="560px"){
			perpageopen();
		}
	}else{
		document.getElementById('div.sortby').style.width="110px";
		document.getElementById('div.sortby').style.height="70px";
	}
}

function perpageopen(){
	if(document.getElementById('div.perpage').style.width!="560px"){
		document.getElementById('div.perpage').style.width="560px";
		if(document.getElementById('div.preview').style.width=="500px"){
			previewopen();
		}
		if(document.getElementById('div.sortby').style.width=="400px"){
			sortbyopen();
		}
		if(document.getElementById('div.search').style.width=="560px"){
			searchopen();
		}
	}else{
		document.getElementById('div.perpage').style.width="110px";
	}
}

function sortbydownloadopen(){
	if(document.getElementById('div.sortbydownload').style.width!="400px"){
		document.getElementById('div.sortbydownload').style.width="400px";
		document.getElementById('div.sortbydownload').style.height="170px";
		if(document.getElementById('div.perpagedownload').style.width=="560px"){
			perpagedownloadopen();
		}
	}else{
		document.getElementById('div.sortbydownload').style.width="110px";
		document.getElementById('div.sortbydownload').style.height="70px";
	}
}

function perpagedownloadopen(){
	if(document.getElementById('div.perpagedownload').style.width!="560px"){
		document.getElementById('div.perpagedownload').style.width="560px";
		if(document.getElementById('div.sortbydownload').style.width=="400px"){
			sortbydownloadopen();
		}
	}else{
		document.getElementById('div.perpagedownload').style.width="110px";
	}
}

function adminsortbydownloadopen(){
	if(document.getElementById('div.sortbydownload').style.width!="430px"){
		document.getElementById('div.sortbydownload').style.width="430px";
		document.getElementById('div.sortbydownload').style.height="280px";
		if(document.getElementById('div.perpagedownload').style.width=="560px"){
			adminperpagedownloadopen();
		}
		if(document.getElementById('div.myfilter').style.width=="1020px"){
			myfilteropen();
		}
	}else{
		document.getElementById('div.sortbydownload').style.width="110px";
		document.getElementById('div.sortbydownload').style.height="70px";
	}
}

function adminperpagedownloadopen(){
	if(document.getElementById('div.perpagedownload').style.width!="560px"){
		document.getElementById('div.perpagedownload').style.width="560px";
		if(document.getElementById('div.sortbydownload').style.width=="430px"){
			adminsortbydownloadopen();
		}
		if(document.getElementById('div.myfilter').style.width=="1020px"){
			myfilteropen();
		}
	}else{
		document.getElementById('div.perpagedownload').style.width="110px";
	}
}

function myfilteropen(){
	if(document.getElementById('div.myfilter').style.width!="1020px"){
		document.getElementById('div.myfilter').style.width="1020px";
		if(document.getElementById('div.sortbydownload').style.width=="430px"){
			adminsortbydownloadopen();
		}
		if(document.getElementById('div.perpagedownload').style.width=="560px"){
			adminperpagedownloadopen();
		}
	}else{
		document.getElementById('div.myfilter').style.width="110px";
	}
}

function sortbystatopen(){
	if(document.getElementById('div.sortbystat').style.width!="430px"){
		document.getElementById('div.sortbystat').style.width="430px";
		document.getElementById('div.sortbystat').style.height="280px";
	}else{
		document.getElementById('div.sortbystat').style.width="110px";
		document.getElementById('div.sortbystat').style.height="70px";
	}
}

function sortbysearchopen(){
	if(document.getElementById('div.sortbysearch').style.width!="430px"){
		document.getElementById('div.sortbysearch').style.width="430px";
		document.getElementById('div.sortbysearch').style.height="130px";
	}else{
		document.getElementById('div.sortbysearch').style.width="110px";
		document.getElementById('div.sortbysearch').style.height="70px";
	}
}