// select jump
function site_jump( selObj ){

    aid = getCookie('aid');
    bid = getCookie('bid');

    tc_aid = selObj.href.indexOf('a_aid',0);
    tc_bid = selObj.href.indexOf('a_bid',0);

    if( aid != '' && bid != '' && ( tc_aid == -1 || tc_bid == -1 )){
        selObj.href = selObj.href + "?a_aid=" + aid + "&a_bid=" + bid;
    }

    return;

}
function getCookie(keyname){

    tmp = document.cookie + ";";
    index1 = tmp.indexOf(keyname,0);
    if(index1 != -1){
        tmp =  tmp.substring(index1, tmp.length);
        index2 = tmp.indexOf("=",0) + 1;
        index3 = tmp.indexOf(";", index2);
        return(unescape(tmp.substring(index2,index3)));
    }
    return("");
}
// check submit
function chk_submit(selObj){

  var about   = selObj.about.options[selObj.about.selectedIndex].value;
  var subject = selObj.subject.value;
  var email   = selObj.email.value;
  var comment = selObj.comment.value;

	if( about == '' ){
		alert('お問合せの種類が選択されていません。');
		return false;
	}else if( subject == '' ){
		alert('件名が入力されていません。');
		return false;
	}else if( email == '' ){
		alert('E-mailが入力されていません。');
		return false;
	}else if( ! email.match(/^[^@]{1,}@.{1,}\..{1,}$/)){
		alert('E-mailの入力が間違っています。');
		return false;
	}else if( comment == '' ){
		alert('お問い合わせ内容が入力されていません。');
		return false;
	}

	return true;

}
