/*
 *	汎用JavaScript
 *	common.js - utf-8
 *
 *	2009-??-??. Hirotaka Yamashita.
 *	update: 2011-03-28.
 *
 */

/*
 *	セキュアサイトアドレス取得
 */
var getHttpsUrl = function () {
//	var httpsUrl1 = 'https://localhost/~sousyu/my2010new.backup/secure/2010/';		//開発用
//	var httpsUrl1 = 'https://150.19.243.71/~sousyu/my2010new.backup/secure/2010/';	//テスト環境用
//  var httpsUrl1 = 'https://150.19.243.8/2010/';														//テスト環境用
	var httpsUrl1 = 'https://secure.tsuru-gakuen.ac.jp/htp/2010/';					//本番用

	return httpsUrl1;
}

/*
 *	ポップアップ（新規タブ）ページの表示
 */
var popUpLink = function (href, width, height) {
	window.open(href, "_blank", 'width=' + width + ', height=' + height);

	return false;
};

/*
 *	表示項目（プルダウン）表示設定切替
 */
var pullDown = function (element, id) {
	var disp = $(element + '#' + id).css('display');
	if (disp != 'none') {
		$(element + '#' + id).css('display', 'none');
	} else {
		$(element + '#' + id).css('display', 'block');
	}

	return false;
}

/*
 *	表示項目（プルダウン）２項目同時表示設定切替
 */
var pullDownOnOff = function (element1, id1, element2, id2) {
	var disp = $(element1 + '#' + id1).css('display');
	if (disp != 'none') {
		$(element1 + '#' + id1).css('display', 'none');
		$(element2 + '#' + id2).css('display', 'block');
	} else {
		$(element1 + '#' + id1).css('display', 'block');
		$(element2 + '#' + id2).css('display', 'none');
	}

	return false;
}


var newPageLink = function (target, href) {
	window.open(href, target);

	return false;
}

var ocDemand = function () {
	location.href = getHttpsUrl() + "oc/index.php";
	return false;
}

var siryouDemand = function () {
	location.href=getHttpsUrl() + "demand/index.php";
	return false;
}



