/*==============================================================================
 頁切り替え
--------------------------------------------------------------------------------*/
function page( set ){

	cm( 'page', set );

}
/*==============================================================================
 メソッド（アンパック）
--------------------------------------------------------------------------------*/
function method_unpack(){

	var param = location.search.substr( 1 ).split( '&' );
	var method = new Object();
	for( i = 0; i < param.length; i ++ ){
		var temp = param[i].split( '=' );
		method[ temp[0] ] = temp[1];
	}

	return method;

}
/*==============================================================================
 メソッド（パック）
--------------------------------------------------------------------------------*/
function method_pack( set_obj ){

	var method = new Array();
	for( i in set_obj ){
		if( set_obj[i] == undefined ) continue;
		method.push( i + '=' + set_obj[i] );
	}

	return method.join( '&' );

}
/*==============================================================================
 特定のメソッド入れ替えchange method
------------------------------------------------------------------------------*/
function cm( set_key, set_value ){

	var hash = method_unpack();//new Object();
	hash[ set_key ] = set_value;
	location.href = location.pathname + '?' + method_pack( hash );

}
/*==============================================================================
 特定のメソッド入れ替えchange method
------------------------------------------------------------------------------*/
function href( set ){

	location.href = set;

}

