/*
#################################
link location
#################################
*/

function go( pram, path ){
	//link path
	if(path == '#') var path = '';
	if (pram=='home') top.location.href=path+"index.html";
	else if (pram=='e-mail') top.location.href="mailto:ares@ares.or.jp"+SetSubject('jp')+SetBody('jp');
	else if (pram=='sitemap') top.location.href=path+"jpsitemap.html";
	else if (pram=='ask') top.location.href=path+"ask.html";
	else if (pram=='english') top.location.href="http://www.ares.or.jp/en/index_en.html";
	else if (pram=='info') top.location.href=path+"info.html";
	else if (pram=='privacy') top.location.href=path+"privacy.html";
	else if (pram=='about') top.location.href=path+"abouthp.html";
	else if (pram=='greeting') top.location.href=path+"greeting.html";
	else if (pram=='business') top.location.href=path+"business.html";
	else if (pram=='organ') top.location.href=path+"organization.html";
	else if (pram=='officer') top.location.href=path+"officer.html";
	//else if (pram=='commite') top.location.href=path+"committee.html";
	else if (pram=='history') top.location.href=path+"history.html";
	else if (pram=='member') top.location.href=path+"member.html";
	else if (pram=='add') top.location.href=path+"admission.html";
	else if (pram=='statute') top.location.href=path+"statute.html";
	else if (pram=='conduct') top.location.href=path+"conduct.html";
	else if (pram=='rule') top.location.href=path+"rule.html";
	else if (pram=='group') top.location.href=path+"group.html";
	else if (pram=='access') top.location.href=path+"access.html";
	else if (pram=='form') top.location.href=path+"form.html";
	else if (pram=='relation') top.location.href=path+"relation.html";
	else if (pram=='system') top.location.href=path+"system.html";
	else if (pram=='tax') top.location.href=path+"tax.html";
	else if (pram=='invest') top.location.href=path+"invest.html";
	else if (pram=='jreit') openWin('http://www.ares.or.jp/jreit/index.html', 'new', true, 'width=810,height=700', 0, 0 );
	else if (pram=='jreit_pdb') openWin('http://www.ares.or.jp/jreit_pdb/jreit_pd001.html', 'new', true, 'width=810,height=700', 0, 0 );
	else if (pram=='education') openWin('http://www.ares-campus.ares.or.jp/', 'new', true, 'width=850,height=800', 0, 0 );
	else if (pram=='claim') top.location.href=path+"claim.html";
	else if (pram=='global') top.location.href=path+"reesa.html";
	else if (pram=='global_kanren') top.location.href=path+"reesa.html#kankei";
	else if (pram=='guard') top.location.href=path+"guard.html";
	else if (pram=='release') top.location.href=path+"release.html";
	else if (pram=='ares') top.location.href=path+"ares.html";
	else if (pram=='ares_mail_touroku') openWin('http://www.ares.or.jp/cgi-bin/aresmail_form.html', 'new', true, 'width=800,height=800', 0, 0 );
	else if (pram=='ares_mail') openWin('http://www.ares.or.jp/cgi-bin/aresmail_search.cgi', 'new', true, 'width=800,height=800', 0, 0 );
	else if (pram=='seminar') top.location.href="https://www.ares.or.jp/seminar/";
	else if (pram=='publish') top.location.href=path+"publish.html";
	else if (pram=='educat') top.location.href=path+"education.html";
	else if (pram=='kensyu01') openWin('zyukou061212are/kensyukai_061212are.html', 'new', true, 'width=820,height=700', 0, 0 );//トップ研修会正会員
	else if (pram=='kensyu02') openWin('zyukou061212ares/kensyukai_061212are.html', 'new', true, 'width=820,height=700', 0, 0 );//トップ研修会正会員賛助会員
	else if (pram=='argus') openWin('works/seminar/argus/argus.html', 'new', true, 'width=820,height=700', 0, 0 );//トップページARGUS研修バナー
	else if (pram=='nenkin') openWin('works/seminar/nenkin_forum02.html', 'new', true, 'width=820,height=750', 0, 0 );//トップページ第2回年金フォーラムバナー
	else if (pram=='search01') openWin('http://www.ares-jreit.jp/J-REITView/', 'new', true, 'width=820,height=700', 0, 0 );//個別保有不動産検索システム
	else if (pram=='search02') openWin('http://www.ares.or.jp/cgi-bin/pdb.html', 'new', true, 'width=820,height=700', 0, 0 );//個別保有不動産検索システム
	else if (pram=='party') openWin('works/seminar/anniversary.html', 'new', true, 'width=820,height=700', 0, 0 );//トップ講演会パーティバナー
	else if (pram=='toushika_bn') openWin('investors/index.html', 'new', true, 'width=810,height=700', 0, 0 );//トップ個人投資家向け情報バナー
	else if (pram=='fair_bn') openWin('fair2009/index.html', 'new', true, 'width=810,height=700', 0, 0 );//トップj-reitフェア2009バナー
	else if (pram=='fair2010_bn') openWin('fair2010/index.html', 'new', true, 'width=810,height=700', 0, 0 );//トップj-reitフェア2010バナー
	else if (pram=='fair2010aki_bn') openWin('fair2010aki/index.html', 'new', true, 'width=810,height=700', 0, 0 );//トップj-reitフェア2010秋バナー
	else if (pram=='jpindex2010_bn') openWin('works/seminar/jpindex2010.html', 'new', true, 'width=810,height=700', 0, 0 );//ARES不動産投資インデックスセミナー2010
	else if (pram=='jpindex2011_bn') openWin('works/seminar/jpindex2011.html', 'new', true, 'width=810,height=700', 0, 0 );//ARES不動産投資インデックスセミナー2011
	else if (pram=='forum2009_bn') openWin('works/seminar/2009nenkin.html', 'new', true, 'width=810,height=700', 0, 0 );//ARES-PREA 年金フォーラム2009
	else if (pram=='forum2009_bn2') openWin('http://www.creative-net.co.jp/ares-prea2009/', 'new', true, 'width=810,height=700', 0, 0 );//ARES-PREA 年金フォーラム2009正規サイトへリンク
	else if (pram=='cre') openWin('works/seminar/cre_forum01.html', 'new', true, 'width=820,height=700', 0, 0 );
	else if (pram=='jreit_bn') openWin('http://www.ares.or.jp/cgi-bin/jreit_menu.html', 'new', true, 'width=810,height=700', 0, 0 );
	else if (pram=='ares_mail_bn') openWin('http://www.ares.or.jp/cgi-bin/aresmail_form.html', 'new', true, 'width=800,height=800', 0, 0 );
	else if (pram=='jreit_new') openWin('http://jreit-view.ares.or.jp/jreit/', 'new', true, 'width=810,height=700', 0, 0 );//新JREIT和文
	else if (pram=='jreit_new_e') openWin('http://jreit-view.ares.or.jp/jreit_e/', 'new', true, 'width=810,height=700', 0, 0 );//新JREIT英文
	else if (pram=='pdb_new') openWin('http://jreit-view.ares.or.jp/jreit_pdb/jreit_pd001.html', 'new', true, 'width=810,height=700', 0, 0 );//新PDB和文
	else if (pram=='pdb_new_e') openWin('http://jreit-view.ares.or.jp/jreit_pdb_e/jreit_pd001.html', 'new', true, 'width=810,height=700', 0, 0 );//新PDB英文
	else if (pram=='search_id') openWin('http://jreit-pdb.ares.or.jp/J-REITView/', 'new', true, 'width=810,height=700', 0, 0 );//新検索システム
	else if (pram=='search_id_non') openWin('http://www.ares.or.jp/cgi-bin/pdb.html', 'new', true, 'width=810,height=700', 0, 0 );//新検索システムID持っていない
	else if (pram=='jreit_bn_new') openWin('http://jreit-view.ares.or.jp/jreit/', 'new', true, 'width=810,height=700', 0, 0 );
	else if (pram=='forum2010_bn') openWin('works/seminar/pension_forum2010/index.html', 'new', true, 'width=810,height=700', 0, 0 );//ARES年金フォーラム2010
	else if (pram=='fair2011_bn') openWin('fair2011/index.html', 'new', true, 'width=810,height=700', 0, 0 );//Jリートフェア2011
	else if (pram=='sympo2011') openWin('sympo2011/index.html', 'new', true, 'width=810,height=700', 0, 0 );//Jリート10周年記念シンポジウム
	else if (pram=='seminar2011') openWin('seminar2011/index.html', 'new', true, 'width=810,height=700', 0, 0 );//Jリートセミナー2011
	else if (pram=='forum2011_bn') openWin('http://www.ares.or.jp/pensionforum2011.html', 'new', true, 'width=810,height=700', 0, 0 );//ARES年金フォーラム2011
	else if (pram=='fair2012_bn') openWin('fair2012/index.html', 'new', true, 'width=810,height=700', 0, 0 );//Jリートフェア2012



//不動産投資国際フォーラムバナー
	else if (pram=='forum') openWin('works/seminar/forum2008.html', 'new', true, 'width=820,height=700', 0, 0 );
//トップARES不動産投資インデックス2007バナー
	else if (pram=='bn_infor') top.location.href=path+"bn_infor.html";
//トップ過去の情報

}


/*function golink( pram, path ){
	//link path
	if(path == '#') var path = '';

	if (pram=='home') top.location.href=path+"index_en.html";
	else if (pram=='company') top.location.href=path+"#";
	else if (pram=='sitemap') top.location.href=path+"#";
	//else if (pram=='e-mail') top.location.href="mailto:ares@ares.or.jp"+SetSubject('en')+SetBody('en');
	else if (pram=='japan')  top.location.href=path+"index.html";
}*/


/*
###################################
#CRLF check method
###################################
*/
function getCRLF(){
	var is = new Is_env();

	if(is.MAC){ //Macの改行コードは「CR=%0D」
		return ("%0D");
	}else if(is.WIN){ //Windowsの改行コードは「CRLF=%0D%0A」
		return ("%0D%0A");
	}else{ //UNIXの改行コードは「LF=%0A」
		return ("%0A");
	}
}


function SetSubject( pram ){
	var is = new Is_env();
	
	if(pram == 'jp'){
		//Shift_JIS( URL encode )
		if(is.FIREFOX || is.NN8X) return "?Subject=ARES%82%D6%82%CC%82%A8%96%E2%82%A2%8D%87%82%ED%82%B9";
		//UTF-8
		else if(is.OPERA) return "?Subject=ARES%E3%81%B8%E3%81%AE%E3%81%8A%E5%95%8F%E3%81%84%E5%90%88%E3%82%8F%E3%81%9B";

		//Shift_JIS
		else return "?Subject=ARESへのお問い合わせ";
	}else{
		return "?Subject=Inquiry of ARES";
	}
}

function SetBody( pram ){
	var is = new Is_env();
	
	if(pram == 'jp'){ //japanese
		if(is.FIREFOX || is.NN8X){ //Shift_JIS(URL encode)
			var body = "&body=%81E %82%A8%96%BC%91O %81F";
			body += getCRLF();
			body += "%81E %98A%97%8D%90%E6 %81F";
			body += getCRLF();
			body += "%81E %93%E0%97e %81F";
			return body;
		}else if(is.OPERA){ //UTF-8
			var body = "&body=%E3%83%BB %E3%81%8A%E5%90%8D%E5%89%8D %EF%BC%9A";
			body += getCRLF();
			body += "%E3%83%BB %E9%80%A3%E7%B5%A1%E5%85%88 %EF%BC%9A";
			body += getCRLF();
			body += "%E3%83%BB %E5%86%85%E5%AE%B9 %EF%BC%9A";
			return body;
		}else{ //Shift_JIS
			var body = "&body=・ お名前：";
			body += getCRLF();
			body += "・ 連絡先：";
			body += getCRLF();
			body += "・ 内容：";
			return body;
		}
	}else{ //english
		var body = "&body=* Name : ";
			body += getCRLF();
			body += "* Contact : ";
			body += getCRLF();
			body += "* Question : ";
			return body;
	}
}


