var TOP_TOPICS_DISPLAY_PATH='/cgi-bin/contents/topTopics/display.cgi';
var HOT_NEWS_DISPLAY_PATH='/cgi-bin/contents/hotNews/display.cgi';
var MAKER_COLLECTION_DISPLAY_PATH='/cgi-bin/contents/makerCollection/display.cgi';
var SPECIAL_BANNER_DISPLAY_PATH='/cgi-bin/contents/specialBanner/display.cgi';

var BOTTOM_BANNER_DISPLAY_PATH='/cgi-bin/contents/bottomBanner/display.cgi';

var CAMPAIGN_REST_DISPLAY_PATH ='/cgi-bin/contents/campaignRest/display.cgi';
//----------------------------------


var parentCont;


//---------------------------------------------------------

function displayAllCollectionIndex(){
	var url = document.URL;
	var n;
	var parent_name='';
	var page_name='';
	var sub_name='';
	if(url.match(/http:\/\/([\w|\.|\-]+)\/([\w|\-]+)\/([\w|\-]+)\.html/)){
		parent_name='special/all-collection';
		page_name='index';
	}else{

		n = url.match(/http:\/\/([\w|\.|\-]+)\/(.+)/);
		var str=n[2];

		//.htmlで終わる
		if(str.match(/(.+)\.html$/)){

			var test = str.split("/");

			for(var i=0; i< test.length-1; i++){
				sub_name += test[i];
				if(i !=test.length-1 && test.length!=2){
					sub_name +='/';
				}
			}
			var test2=test[test.length-1].split(".");
			sub_name =test2[0];
		}else{
			var test = str.split("/");
			for(var i=0; i< test.length-1; i++){
				
				sub_name += test[i];
				if(i !=test.length-1 && test.length!=2){
					sub_name +='/';
				}
			}
			page_name='index';
		
		}

		parent_name='special/all-collection/sub';
		page_name='index';
	}
	param='parent='+parent_name+'&page='+page_name+'&sub_name='+sub_name+'&PARENT_CONT=common';
	sendXRequest(pageCont, param, '/cgi-bin/contents/pageCont/'+parent_name+'/index.cgi','POST');
}

//---------------------------------------------------------
var pageCont;
function displayCommonPage(param) {
	var url = document.URL;
	var n;
	var parent_name='';
	var page_name='';
	var parent_path='';
	var parent_category='';
	
	
	if(url.match(/http:\/\/([\w|\.|\-]+)\/([\w|\-]+)\/([\w|\-]+)\.html/)){
		n = url.match(/(.+)\/([\w|\-]+)\/([\w|\-]+)\.html/);
		parent_name='/'+n[2];
		page_name=n[3];
	}else{


		n = url.match(/http:\/\/([\w|\.|\-]+)\/(.+)/);
		var str=n[2];

		//.htmlで終わる
		if(str.match(/(.+)\.html$/)){

			var test = str.split("/");

			for(var i=0; i< test.length-1; i++){
				parent_name += test[i];
				if(i !=test.length-1 && test.length!=2){
					parent_name+='/';
				}
			}
			var test2=test[test.length-1].split(".");
			page_name=test2[0];
			parent_path= '/'+parent_name;

			parent_category=test[1];
		}else{
			var test = str.split("/");
			for(var i=0; i< test.length-1; i++){
				
				parent_name += test[i];
				if(i !=test.length-1 && test.length!=2){
					parent_name+='/';
				}
			}
			if(parent_name.match(/\//)){
			
			}else{
				parent_name = parent_name+'/';
			}

			parent_path= '/'+parent_name;
			parent_category=test[1];

			page_name='index';
		
		}

	}
	param=
		'parent='+parent_name+
		'&parent_path='+parent_path+
		'&parent_category='+parent_category+
	
		'&page='+page_name+'&PARENT_CONT=common';
	//alert(param);
	sendXRequest(pageCont, param, '/cgi-bin/contents/pageCont/'+parent_name+'/index.cgi','POST');
}
function pageCont(obj) {
	var res= obj.responseText;
	setTimeout(function() { 
		document.getElementById('pageCont').innerHTML = res;
		cursorChange('auto')
	}, 200);

	frameInit();

}






function openSlidePage(path,script_type,parent_type) {

	if(script_type == 'include'){
		var test= path.split("/");
		
		if(!test[3]){
			var name =test[2].split(".");
			parentCont= 'slide'+parent_type+'Cont';
			var param = 'parent='+test[1]+'&page='+name[0]+'&PARENT_CONT=slide';
			var script_path='/cgi-bin/contents/pageCont/'+test[1]+'/index.cgi';
			sendXRequest(slidePageCont, param, script_path,'POST');
		}else if(test[3]){
			var name =test[3].split(".");
			//alert(test);
			var parent_path='/'+test[1]+'/'+test[2]+'/';
			var param = 
				'parent_path='+parent_path+
				'&parent_category='+test[2]+
				'&parent='+test[2]+
				
				'&page='+name[0]+'&PARENT_CONT=slide';
		
		
			parentCont= 'slide'+parent_type+'Cont';
			var script_path='/cgi-bin/contents/pageCont/'+test[1]+'/'+test[2]+'/index.cgi';
			//alert(param);
			//alert(script_path);


			sendXRequest(slidePageCont, param, script_path,'POST');
		}
	}else{

		var test= path.split("/");
		parentCont= 'slide'+parent_type+'Cont';
		
		var param;
		
		if(!test[3]){
			var name =test[2].split(".");

			param = 'parent='+test[1]+'&page='+name[0]+'&PARENT_CONT=slide';
		}else if(test[3]){
			var name =test[3].split(".");
			
			param='parent='+test[2]+'&page='+name[0]+'&PARENT_CONT=slide';
			//alert(param);

		}
		
		var script_path='/cgi-bin/contents/pageCont/'+test[1]+'/index.cgi';
		sendXRequest(slidePageCont, param, script_path,'POST');

	}
/*
	var param = 'category='+category_name+'&parent='+parent_name+'&page='+page_name;
	var parent_name2= parent_name;
	var str1= parent_name2.substr(0,1);
	var str2= parent_name2.substr(1,parent_name2.length);
	parent_name2 =str1.toUpperCase()+str2;


	parentCont= 'slidePageCont';
	sendXRequest(slidePageCont, param, '/cgi-bin/contents/'+category_name+'/'+parent_name+'/index.cgi','POST');
	*/
	stopFlash();
	//alert(path);

}


function slidePageCont(obj) {
	var res= obj.responseText;
	setTimeout(function() { 
		document.getElementById(parentCont).innerHTML = res 
		cursorChange('auto')
	}, 200);
	//browser
	//slideBrowser(B_CALLBACK, B_PARAM, B_URL, B_METHOD);


	//frameInit();
}




var commonDivName;
function displayCommon(div_name, param,script_path) {
	parentCont='';
	commonDivName = div_name;
	sendXRequest(commonCont, param, script_path,'POST');
}

function commonCont(obj) {
	var res= obj.responseText;

	setTimeout(function() { 
		document.getElementById(commonDivName).innerHTML = res;
		cursorChange('auto')
	}, 200);

	frameInit();
}


function displayIndexTab(str) {
	var page=getElementValue('indexForm', 'indexName');
	var param;
	if(page){
		param='index='+page;
	}
	if(str){
		param=param+'&'+str;
	}
//alert(param);
	sendXRequest(tabCont, param, '/cgi-bin/contents/tabCont/index/index.cgi','POST');
}

function displayCommonTab(tab_name) {


	param='tab_name='+tab_name;
	sendXRequest(tabCont, param, '/cgi-bin/contents/tabCont/'+tab_name+'/index.cgi','POST');
}
function tabClose() {
	var url = document.URL;
	var tmp= url.match(/http\:\/\/([\w|\.]+)\/([\w|\.]?)/);
	var site_url='http://'+tmp[1]+'/';
	
	if(url ==site_url || url ==site_url+'index.html'){
		displayCommonTab('index');
	}else{
		document.getElementById('tabCont').innerHTML = '';
	}
	frameInit();
}

function tabCont(obj) {
	var res= obj.responseText;
	document.getElementById('tabCont').innerHTML = res;

	setTimeout(function() { 
		frameInit();
	}, 200);

}

//----------------------------------


function displayInfiniteTest(file) {
	var param = 'file='+file;
	sendXRequest(infiniteTestCont, param, '/cgi-bin/contents/service/display/index.cgi','POST');
}

function infiniteTestCont(obj) {
	var res= obj.responseText;
	
	document.getElementById('infiniteTestCont').innerHTML = res;
	frameInit();
	

}


function displayTopTopics() {
	var step='show';
	var param = 'function=execute&step='+step;

	//sendXRequest(topTopicsCont, param, TOP_TOPICS_DISPLAY_PATH,'POST');
}
function topTopicsCont(obj) {
	var res= obj.responseText;

	document.getElementById('topTopicsCont').innerHTML = res;
	frameInit();

}

function displayHotNews() {
	var step='show';
	var param = 'function=execute&step='+step;
		
	sendXRequest(hotNewsCont, param, HOT_NEWS_DISPLAY_PATH,'POST');
}
function hotNewsCont(obj) {
	var res= obj.responseText;
	document.getElementById('hotNewsCont').innerHTML = res;
	frameInit();
}


function displayMakerCollection() {
	var step='show';
	var param = 'function=execute&step='+step;
		
	sendXRequest(makerCollectionCont, param, MAKER_COLLECTION_DISPLAY_PATH,'POST');
}
function makerCollectionCont(obj) {
	var res= obj.responseText;
	document.getElementById('makerCollectionCont').innerHTML = res;
	frameInit();
}

function displaySpecialBanner() {
	var step='show';
	var param = 'function=execute&step='+step;
		
	sendXRequest(specialBannerCont, param, SPECIAL_BANNER_DISPLAY_PATH,'POST');
}
function specialBannerCont(obj) {
	var res= obj.responseText;
	document.getElementById('specialBannerCont').innerHTML = res;
	frameInit();
}






function displayBottomBanner() {
	var step='show';
	var param = 'function=execute&step='+step;
	sendXRequest(bottomBannerCont, param, BOTTOM_BANNER_DISPLAY_PATH,'POST');
}










function bottomBannerCont(obj) {
	var res= obj.responseText;
	document.getElementById('bottomBannerCont').innerHTML = res;
	frameInit();
}
function campaignRest(id) {
	var param = 'CAMPAIGN_ID='+id;
	sendXRequest(CAMPAIGN_REST_CONT, param, CAMPAIGN_REST_DISPLAY_PATH,'POST');
}
function CAMPAIGN_REST_CONT(obj) {
	var res= obj.responseText;
	document.getElementById('CAMPAIGN_REST_CONT').innerHTML = res;
	frameInit();
}


var INFINITE_PHOTO_LIST_PATH ='/cgi-bin/contents/infinitePhoto/list.cgi';
var INFINITE_PHOTO_MENU_PATH ='/cgi-bin/contents/infinitePhoto/menu.cgi';

function infinitePhotoList(page_num){
	if(!page_num){
		page_num=1;
	}
	var param = 'PAGE_NUM='+page_num;
	sendXRequest(INFINITE_PHOTO_LIST_CONT, param, INFINITE_PHOTO_LIST_PATH,'POST');
}
function INFINITE_PHOTO_LIST_CONT(obj) {
	var res= obj.responseText;
	document.getElementById('INFINITE_PHOTO_LIST_CONT').innerHTML = res;
	frameInit();
}

var PHOTO_LIST_PATH ='/cgi-bin/contents/photoList/list.cgi';

function photoList(page_num, display_num,car_coating_en, car_maker_en){
	if(!page_num){
		page_num=1;
	}
	if(!display_num){
		display_num =50;
	}
	if(! car_coating_en){
		car_coating_en ='';
	}
	if(! car_maker_en){
		car_maker_en ='';
	}
	//コレクションごとにクッキー
	var param = 'PAGE_NUM='+page_num+'&DISPLAY_NUM='+display_num+
		'&CAR_COATING_EN='+car_coating_en+
		'&CAR_MAKER_EN='+car_maker_en+
		'&cache='+(new Date()).getTime();
		
	sendXRequest(PHOTO_LIST_CONT, param, PHOTO_LIST_PATH,'POST');
}
function photoListCarMakerSelect(page_num, display_num, car_coating_en){
	if(!page_num){
		page_num=1;
	}
	if(!display_num){
		display_num =50;
	}
	if(! car_coating_en){
		car_coating_en ='';
	}
	
	var car_maker_en = getElementValue('photoForm','CAR_MAKER_EN');
	//コレクションごとにクッキー
	var param = 'PAGE_NUM='+page_num+'&DISPLAY_NUM='+display_num+'&CAR_COATING_EN='+car_coating_en+'&CAR_MAKER_EN='+car_maker_en;
	sendXRequest(PHOTO_LIST_CONT, param, PHOTO_LIST_PATH,'POST');
}

function PHOTO_LIST_CONT(obj) {
	var res= obj.responseText;
	document.getElementById('PHOTO_LIST_CONT').innerHTML = res;
	frameInit();
}


function displaySubMenu(){
	var param = ''+
		'&cache='+(new Date()).getTime();
	sendXRequest(subMenuCont, param, '/cgi-bin/contents/subMenuCont/index.cgi','POST');
}
function subMenuCont(obj) {
	var res= obj.responseText;
	document.getElementById('subMenuCont').innerHTML = res;
	frameInit();
}


function displaySiteMenu(){
	var param = ''+
		'&cache='+(new Date()).getTime();
		
	sendXRequest(siteMenuCont, param, '/cgi-bin/system/index/index/siteMenu.cgi','POST');
}

function siteMenuCont(obj) {
	var res= obj.responseText;
	document.getElementById('siteMenuCont').innerHTML = res;
	frameInit();
}

var sideBarCommon;
var sideBarCommon2;
function displaySideBar(){
	sideBarCommon='sidebarCont';
	sideBarCommon2='sidebarCont2';
	var param = ''+
		'&cache='+(new Date()).getTime();
		
	sendXRequest(sidebarCont, param, '/cgi-bin/contents/sidebarCont/index.cgi','POST');
	sendXRequest(sidebarCont2, param, '/cgi-bin/contents/sidebarCont2/index.cgi','POST');
}
function displaySideBarReserve(){
	if(document.getElementById('sidebarReserveCont')){
		sideBarCommon='sidebarReserveCont';
		sideBarCommon2='sidebarReserveCont2';
		var param = ''+
			'&cache='+(new Date()).getTime();
		parentCont='';
		sendXRequest(sidebarCont, param, '/cgi-bin/contents/sidebarCont/reserve.cgi','POST');
		sendXRequest(sidebarCont2, param, '/cgi-bin/contents/sidebarCont2/reserve.cgi','POST');
	}
	//registEnd
	if(document.getElementById('cartInfo')){
		cartInfo();
	}
	if(document.getElementById('serviceInfoCont')){
		serviceChange('reserve');
	}
}
function displaySideBarShopping(){
	if(document.getElementById('sidebarShoppingCont')){
		sideBarCommon='sidebarShoppingCont';
		sideBarCommon2='sidebarShoppingCont2';
		var param = ''+
			'&cache='+(new Date()).getTime();
		
		sendXRequest(sidebarCont, param, '/cgi-bin/contents/sidebarCont/shopping.cgi','POST');
		sendXRequest(sidebarCont2, param, '/cgi-bin/contents/sidebarCont2/shopping.cgi','POST');
	}
}
function sidebarCont(obj) {
	var res= obj.responseText;
		document.getElementById(sideBarCommon).innerHTML = res;
	
	flashObjInit();
	frameInit();
}
function sidebarCont2(obj) {
	var res= obj.responseText;
		document.getElementById(sideBarCommon2).innerHTML = res;
	
	flashObjInit();
	frameInit();
}

function displayHighslideCont(){
	var param = '';
		
	sendXRequest(HIGH_SLIDE_CONT, param, '/cgi-bin/contents/highslideCont/index/index.cgi','POST');
}
function HIGH_SLIDE_CONT(obj) {

	var res= obj.responseText;
	document.getElementById('highslideCont').innerHTML = res;
}


function menuText(id,text){
	document.getElementById(id).innerHTML = text;
}




function displaySlideBody(target_name,str){
	slideBodyName = target_name+'Body';

	var param= str+
		'&cache='+(new Date()).getTime();

	sendXRequest(receiveSlideBody, param, '/cgi-bin/contents/slideCont/'+target_name+'/index.cgi','POST');
	stopFlash();

}
function receiveSlideBody(obj) {
	var res= obj.responseText;
	document.getElementById(slideBodyName).innerHTML = res;
}

var slideCont;
function openSlideCommon(target_name,str){
	var param= str+
		'&cache='+(new Date()).getTime();
		
	slideCont = target_name+'Body';
	sendXRequest(slideCommonCont, param, '/cgi-bin/contents/slideCont/'+target_name+'/index.cgi','POST');
	stopFlash();

}
function slideCommonCont(obj) {
	var res= obj.responseText;
	document.getElementById(slideCont).innerHTML = res;
}



var slide_cont_name;
function displaySlideCont(target_name,str){
	var param= str+
		'&cache='+(new Date()).getTime();
		
	slide_cont_name = target_name+'Cont';
	sendXRequest(receiveSlideCont, param, '/cgi-bin/contents/slideCont/'+target_name+'/index.cgi','POST');
}

function receiveSlideCont(obj) {
	var res= obj.responseText;
	document.getElementById(slide_cont_name).innerHTML = res;
}

function questionList(){
	var param= '';
	sendXRequest(questionListCont, param, '/cgi-bin/contents/questionList/index.cgi','POST');
}

function questionListCont(obj) {
	var res= obj.responseText;
	document.getElementById('questionListCont').innerHTML = res;
}

function openSlideCollection(type,val,num){
	var param;
	if(!num){
		num =1;
	}

	if(type =='detail'){
		 param= 'type=detail&COLLECTION_ID='+val+
		'&num='+num+
		'&cache='+(new Date()).getTime();
	}else if (type=='maker'){
		if(!val){
			var maker=getElementValue('collectionForm','CAR_MAKER_EN');
			if(maker){
				val=maker;
				 param= 'type=maker&CAR_MAKER_EN='+val+
				'&cache='+(new Date()).getTime();
			}else{
				
			}
		}else{
			 param= 'type=maker&CAR_MAKER_EN='+val+
			'&cache='+(new Date()).getTime();
			//alert(param);

		}
	}else if (type=='model'){
		if(!val){
			var maker=getElementValue('collectionForm','CAR_MAKER_EN');
			var model=getElementValue('collectionForm','CAR_MODEL_EN');

			if(maker && model){
			 	param= 'type=model&CAR_MAKER_EN='+maker+
				'&CAR_MODEL_EN='+model+
				'&cache='+(new Date()).getTime();
			}
		}else{
			 param= 'type=model&'+val+
			'&cache='+(new Date()).getTime();
		}

	}else if (type=='grade'){
		var maker=getElementValue('collectionForm','CAR_MAKER_EN');
		var model=getElementValue('collectionForm','CAR_MODEL_EN');
		var grade=getElementValue('collectionForm','CAR_GRADE_SHORT');
		
		if(maker && model && grade){
			 param= 'type=grade&CAR_MAKER_EN='+maker+
			'&CAR_MODEL_EN='+model+
			'&CAR_GRADE_SHORT='+grade+
			'&cache='+(new Date()).getTime();
		}
	}
	if(param){
		//alert(param);
		parentCont = 'slideCollectionCont';
		sendXRequest(slideCollectionCont, param, '/cgi-bin/contents/slideCont/slideCollection/index.cgi','POST');
		stopFlash();
	}

}
function slideCollectionCont(obj) {
	var res= obj.responseText;
	document.getElementById(parentCont).innerHTML = res;

}

function selectGuide(type) {
	var guide_category;
	var guide_group;
	var guide_id;
	
	var param='step=select';
	
	if(type=='category'){
		guide_category =getElementValue('guideFrom','CATEGORY_NAME_EN');
		if(guide_category){
			param= param+'&CATEGORY_NAME_EN='+guide_category;

		}
	}else if(type=='group'){
		guide_category =getElementValue('guideFrom','CATEGORY_NAME_EN');
		guide_group=getElementValue('guideFrom','GROUP_NAME_EN');
		if(guide_group){
			param= param+'&CATEGORY_NAME_EN='+guide_category+'&GROUP_NAME_EN='+guide_group;
		}
	}else if(type=='article'){
	
		guide_id=getElementValue('guideFrom','GUIDE_ID');
		if(guide_id){
			param= param+'&GUIDE_ID='+guide_id;
		}
	}

	var param=param+'&cache='+(new Date()).getTime();
	//alert(param);
	slideCont = 'slideGuideBody';
	sendXRequest(slideCommonCont, param, '/cgi-bin/contents/slideCont/slideGuide/index.cgi','POST');
	stopFlash();
}

function selectQuestion(type) {
	var question_category;
	var question_group;
	var question_id;
	
	var param='step=select';
	
	if(type=='category'){
		question_category =getElementValue('questionFrom','CATEGORY_NAME_EN');
		if(question_category){
			param= param+'&CATEGORY_NAME_EN='+question_category;

		}
	}else if(type=='group'){
		question_category =getElementValue('questionFrom','CATEGORY_NAME_EN');
		question_group=getElementValue('questionFrom','GROUP_NAME_EN');
		if(question_group){
			param= param+'&CATEGORY_NAME_EN='+question_category+'&GROUP_NAME_EN='+question_group;
		}
	}else if(type=='article'){
	
		question_id=getElementValue('questionFrom','QUESTION_ID');
		if(question_id){
			param= param+'&QUESTION_ID='+question_id;
		}
	}
	var param=param+'&cache='+(new Date()).getTime();

	//alert(param);
	slideCont = 'slideQuestionBody';
	sendXRequest(slideCommonCont, param, '/cgi-bin/contents/slideCont/slideQuestion/index.cgi','POST');
	stopFlash();
}


function displayMakerFair(){
	//var maker = getElementValue('makerFairForm', 'CAR_MAKER_EN');
	var param='';
	sendXRequest(makerFairCont, param, '/cgi-bin/contents/pageCont/special/world-collection/makerFair.cgi','POST');
}

function makerFairCont(obj) {
	var res= obj.responseText;
	document.getElementById('makerFairCont').innerHTML = res;
}

function displayMakerFair2(){
	//var maker = getElementValue('makerFairForm', 'CAR_MAKER_EN');
	var param='';
	sendXRequest(makerFairCont, param, '/cgi-bin/contents/pageCont/special/all-collection/makerFair.cgi','POST');
}


function openSlideMonitor(monitor_id,type){
	
	parentCont = 'slideNoheadCont';
	var param=
		'MONITOR_ID='+monitor_id+
		'&DISPLAY_TYPE='+type+
		'&cache='+(new Date()).getTime();
	sendXRequest(slideNoheadCont, param, '/cgi-bin/contents/slideCont/slideMonitor/index.cgi','POST');

}
function slideNoheadCont(obj) {
	var res= obj.responseText;
	document.getElementById('slideNoheadCont').innerHTML = res;

}

function monitorListPage(monitor_name,page_num, display_num, cols,order,width){

	
	var param=
		'MONITOR_NAME='+monitor_name+
		'&PAGE_NUM='+page_num+
		'&DISPLAY_NUM='+display_num+
		'&COLS='+cols+
		'&ORDER='+order+
		'&WIDTH='+width+
		'&SEARCH=0'
		'&cache='+(new Date()).getTime();
//alert(param);

	param+=makeFormParam(monitor_name+'Form');

	commonCont= monitor_name+'Cont';
	sendXRequest(monitorListPageCont, param, '/cgi-bin/contents/pageCont/special/monitor-channel/lib/searchMonitor.cgi','POST');

}
function monitorListPageCont(obj) {
	var res= obj.responseText;
	//alert(res);
	document.getElementById(commonCont).innerHTML = res;

}
function damageSearch(page_num){
	
	if(!page_num){
		page_num=0;
	}
	var param=
		'PAGE_NUM='+page_num+
		'&cache='+(new Date()).getTime();

	param+=makeFormParam('damageForm');

	//alert(param);
	commonCont= 'damageCont';
	sendXRequest(damageSearchCont, param, '/cgi-bin/contents/pageCont/special/monitor-channel/lib/searchDamage.cgi','POST');

}
function damageSearchCont(obj) {
	var res= obj.responseText;
	document.getElementById(commonCont).innerHTML = res;
	frameInit();


}

function monitorSearch(monitor_name_en,page_num){
	
	
	var param=
		'PAGE_NUM='+page_num+
		'&SEARCH=1'
		'&cache='+(new Date()).getTime();

	param+=makeFormParam(monitor_name_en+'Form');

	commonCont= monitor_name_en+'Cont';
	sendXRequest(monitorSearchCont, param, '/cgi-bin/contents/pageCont/special/monitor-channel/lib/searchMonitor.cgi','POST');

}
function monitorSearchCont(obj) {
	var res= obj.responseText;
	document.getElementById(commonCont).innerHTML = res;
	frameInit();


}




function sidebarMonitor(monitor_name){
	
	
	var param=
		'&MONITOR_NAME='+monitor_name
		'&SEARCH=1'
		'&cache='+(new Date()).getTime();

	param+=makeFormParam(monitor_name+'SidebarForm');
//alert(param);
	commonCont= monitor_name+'SidebarCont';
	sendXRequest(sidebarMonitorCont, param, '/cgi-bin/contents/sidebarCont/lib/sidebarMonitor.cgi','POST');

}

function sidebarMonitorCont(obj) {
	var res= obj.responseText;
	document.getElementById(commonCont).innerHTML = res;
	frameInit();
}
function monitorBanner(car_maker_en,type){
	
	
	var param=
		'CAR_MAKER_EN='+car_maker_en+
		'&DISPLAY_TYPE='+type+
		'&cache='+(new Date()).getTime();

	commonCont='monitorBannerCont';
	sendXRequest(monitorBannerCont, param, '/cgi-bin/contents/tabCont/index/lib/monitorBanner.cgi','POST');

}

function monitorBannerCont(obj) {
	var res= obj.responseText;
	document.getElementById(commonCont).innerHTML = res;
	frameInit();
}
function indexMonitorTopics(type){
	
	var param=
		'DISPLAY_TYPE='+type+
		'&cache='+(new Date()).getTime();
	commonCont='indexMonitorTopicsCont';
	sendXRequest(indexMonitorTopicsCont, param, '/cgi-bin/contents/tabCont/index/lib/monitorTopics.cgi','POST');

}

function indexMonitorTopicsCont(obj) {
	var res= obj.responseText;
	document.getElementById(commonCont).innerHTML = res;
	frameInit();
}


function topMonitor(monitor_name){
	//alert(monitor_name+'_CAR_MAKER_EN');
	var car_maker_en=getElementValue(monitor_name+'TopForm',monitor_name+'_CAR_MAKER_EN');
	//alert(car_maker_en);
	if(car_maker_en){
		var param=
			'&MONITOR_NAME='+monitor_name+
			'&CAR_MAKER_EN='+car_maker_en+
			'&cache='+(new Date()).getTime();

		//param+=makeFormParam(monitor_name+'topForm');
		//alert(param);
		commonCont= monitor_name+'TopMonitorCont';
		//alert(commonCont);
		sendXRequest(topMonitorCont, param, '/cgi-bin/contents/tabCont/index/lib/topMonitor.cgi','POST');
	}

}


function topMonitorCont(obj) {
	var res= obj.responseText;
	//alert(res);
	document.getElementById(commonCont).innerHTML = res;
	frameInit();
}

function loadMonitorVisited(monitor_name, vnum, start_num, end_num, status, target_id){
	//alert(monitor_name);
	//alert(start_num);
	//alert(end_num);
	//alert(target_id);
	if(document.getElementById(target_id).innerHTML){
		//alert();	
	}else{
		//読み込む
		var param=
			'&MONITOR_NAME='+monitor_name+
			'&VNUM='+vnum+
			'&START_NUM='+start_num+
			'&END_NUM='+end_num+
			'&STATUS='+status+
			'&cache='+(new Date()).getTime();

		commonCont= target_id;
		sendXRequest(loadMonitorVisitedCont, param, '/cgi-bin/contents/pageCont/special/3monitor/lib/loadMonitorVisited.cgi','POST');
	}

}

function loadMonitorVisitedCont(obj) {
	var res= obj.responseText;
	document.getElementById(commonCont).innerHTML = res;
	frameInit();
}
