get = new Array;

if( location.search.length > 1 ){
	var items = location.search.substr(1).split("&");
	for (var i in items) {
		var varval = items[i].split("=");
		get[varval[0]] = unescape(varval[1]);
	}
}

function PrintPage(){
	var url = document.location.href;
	url = url + '?mode=print';
	newWindow=window.open(url.replace('#',''));
}

function PageSet(){
	if(get["mode"] == "print"){
		DispOut('header');
		DispOut('global_navi');
		DispOut('right_contents');
		DispOut('footer');
		DispOut('base_foot');
		DispOut('page_foot');
		Color('base_body');
		Margin('base_frame');
	}
}

function DispOut(boxID){
	bElements = document.getElementById(boxID);
	if(bElements != null){
		bElements.style.display = 'none';
	}
}

function Color(boxID){
	bElements = document.getElementById(boxID);
	if(bElements != null){
		bElements.style.backgroundColor = '#ffffff';
	}
}

function Margin(boxID){
	bElements = document.getElementById(boxID);
	if(bElements != null){
		bElements.style.margin = '0px';
	}
}
