var isMSIE 	= (navigator.userAgent.indexOf('MSIE') >= 0);
var isMac 	= (navigator.userAgent.indexOf('Mac') >= 0) ;
var isOpera     = (navigator.userAgent.indexOf('Opera') >= 0);
var isFirefox   = (navigator.userAgent.indexOf('Mozilla/5.0') >= 0);
var isMacIE     = (isMac) && (navigator.appName=="Microsoft Internet Explorer");
var isSafari    = (isMac) && (navigator.userAgent.indexOf('Safari')>=0);

function OpenWinLMS(width, height, domain) {
    try {
	if(!document.form01.sel_https.checked){
	    var win = window.open('http://'+domain, 'LMS', "resizable=1,scrollbars=1,menubar=0,directories=0,status=0,location=0,fullscreen=0,width=" + width + ",height=" + height) ;
	}else{
	    var win = window.open('https://'+domain, 'LMS', "resizable=1,scrollbars=1,menubar=0,directories=0,status=1,location=0,fullscreen=0,width=" + width + ",height=" + height) ;
	}
	win.focus();
	win.moveTo(0,0);
    }catch (e) {
	return false;
    }
    return true;
}

///// 20110715_SUETSUGU_DELETE_START 使われていないので削除 
//function touroku(width, height, domain, ssl_domain){
//    if(!document.form01.sel_https.checked){
//	////var winT = window.open('http://'+domain+'/user_register/input/', 'TOUROKU', "resizable=1,scrollbars=1,menubar=0,directories=0,status=1,location=0,fullscreen=0,width=" + width + ",height=" + height) ;
//	var winT = window.open('http://regist.cael.jp/new-account/', 'TOUROKU', "resizable=1,scrollbars=1,menubar=0,directories=0,status=1,location=0,fullscreen=0,width=" + "1024" + ",height=" + "768") ;
//    }else{
//	////var winT = window.open('https://'+ssl_domain+'/user_register/input/', 'TOUROKU', "resizable=1,scrollbars=1,menubar=0,directories=0,status=1,location=0,fullscreen=0,width=" + width + ",height=" + height) ;
//	var winT = window.open('http://regist.cael.jp/new-account/', 'TOUROKU', "resizable=1,scrollbars=1,menubar=0,directories=0,status=1,location=0,fullscreen=0,width=" + "1024" + ",height=" + "768") ;
//    }
//    winT.focus();
// }
//// 20110715_SUETSUGU_DELETE_END

function OpenSSL(width, height, domain) {
    try {
	    var win = window.open('https://'+domain, 'LMS', "resizable=1,scrollbars=1,menubar=0,directories=0,status=1,location=0,fullscreen=0,width=" + "1024" + ",height=" + "768") ;
	win.focus();
	win.moveTo(0,0);
    }catch (e) {
	return false;
    }
    return true;
}

function tourokuSSL(width, height, domain, ssl_domain){
	var winT = window.open('https://regist.cael.jp/new-account/', 'TOUROKU', "resizable=1,scrollbars=1,menubar=0,directories=0,status=1,location=0,fullscreen=0,width=" + "1024" + ",height=" + "768") ;
    winT.focus();
}


//////CONTACT ASP PAGE
function openContactWin(){
   wx = 880;
   wy = 720;
   x = (screen.width  - wx) / 2;
   y = (screen.height - wy) / 2;
	var winC = window.open('https://www.s-db.jp/entry?k=750e60919adc8a9b00ec3d23fb333d41eeAe%2C7e', 'CONTACT', "resizable=1,scrollbars=1,menubar=1,directories=0,status=1,location=1,fullscreen=0,width=880,height=720"+",left="+x+",top ="+y) ;

    winC.focus();
}

//// googleAnalitcs
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-24138184-1']);
  _gaq.push(['_setDomainName', '.cael.jp']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
//googleAnalitcs

