function getCookie(key){

	tmp=document.cookie+";";

	tmp1=tmp.indexOf(key, 0);

	if(tmp1!=-1){

		tmp=tmp.substring(tmp1, tmp.length);

		start=tmp.indexOf("=", 0)+ 1;

		end=tmp.indexOf(";", start);

		return(unescape(tmp.substring(start, end)));

	}

	return("");

}

function mg_mbnelpla(){

	var gWindowWidth  = 359;

	var gWindowHeight = 446;

	var st = 'width=' + gWindowWidth;

	st += ',';

	st += 'height=' + gWindowHeight;

	st += ',';

	var cw = (screen.width / 2) - (gWindowWidth / 2);

	var ch = (screen.height / 2) - (gWindowHeight / 2);

	if (navigator.userAgent.indexOf('MSIE') != -1) {

		st += 'left=' + cw;

		st +=',';

		st += 'top=' + ch;

	}else if (navigator.userAgent.indexOf('Mozilla') != -1) {

		st += 'screenX=' + cw;

		st += ',';

		st += 'screenY=' + ch;

	}

	st += "resizable=1, scrollbars=0, menubar=0, directories=0, status=0, location=0,toolbar=0";

	newwindow = window.open('http://nelpla.com/mobile/index.html', 'mbnelpla', st);

	newwindow.focus();

}

function mg_delcheck(){

		if ( confirm('削除します。よろしいですか？')){	

			return true 

		}else{

			return false 

		}

}

function mg_wopenmap(url) {

	var gWindowWidth  = 770;

	var gWindowHeight = 800;

	var st = 'width=' + gWindowWidth;

	st += ',';

	st += 'height=' + gWindowHeight;

	st += ',';

	var cw = (screen.width / 2) - (gWindowWidth / 2);

	var ch = (screen.height / 2) - (gWindowHeight / 2);

	if (navigator.userAgent.indexOf('MSIE') != -1) {

		st += 'left=' + cw;

		st +=',';

		st += 'top=' + ch;

	}else if (navigator.userAgent.indexOf('Mozilla') != -1) {

		st += 'screenX=' + cw;

		st += ',';

		st += 'screenY=' + ch;

	}

	st += "resizable=1, scrollbars=1, menubar=0, directories=0, status=0, location=0";

	newwindow = window.open(url, 'map', st);

	newwindow.focus();

}



function mg_profopen(url) {

	var gWindowWidth  = 650;

	var gWindowHeight = 700;

	var st = 'width=' + gWindowWidth;

	st += ',';

	st += 'height=' + gWindowHeight;

	st += ',';

	var cw = (screen.width / 2) - (gWindowWidth / 2);

	var ch = (screen.height / 2) - (gWindowHeight / 2);

	if (navigator.userAgent.indexOf('MSIE') != -1) {

		st += 'left=' + cw;

		st +=',';

		st += 'top=' + ch;

	}else if (navigator.userAgent.indexOf('Mozilla') != -1) {

		st += 'screenX=' + cw;

		st += ',';

		st += 'screenY=' + ch;

	}

	st += "resizable=1, scrollbars=1, menubar=0, directories=0, status=0, location=0";

	newwindow = window.open(url, 'prof', st);

	newwindow.focus();

}



function mg_wopen_wh(url,gWindowWidth,gWindowHeight) {

	var st = 'width=' + gWindowWidth;

	st += ',';

	st += 'height=' + gWindowHeight;

	st += ',';

	var cw = (screen.width / 2) - (gWindowWidth / 2);

	var ch = (screen.height / 2) - (gWindowHeight / 2);

	if (navigator.userAgent.indexOf('MSIE') != -1) {

		st += 'left=' + cw;

		st +=',';

		st += 'top=' + ch;

	}else if (navigator.userAgent.indexOf('Mozilla') != -1) {

		st += 'screenX=' + cw;

		st += ',';

		st += 'screenY=' + ch;

	}

	st += "resizable=yes, scrollbars=yes, menubar=yes, directories=0, status=0, location=0";

	newwindow = window.open(url, 'sub', st);

	newwindow.focus();

}



function mg_pallet(url) {

	var gWindowWidth  = 380;

	var gWindowHeight = 60;

	var st = 'width=' + gWindowWidth;

	st += ',';

	st += 'height=' + gWindowHeight;

	st += ',';

	var cw = (screen.width / 2) - (gWindowWidth / 2);

	var ch = (screen.height / 2) - (gWindowHeight / 2);

	if (navigator.userAgent.indexOf('MSIE') != -1) {

		st += 'left=' + cw;

		st +=',';

		st += 'top=' + ch;

	}else if (navigator.userAgent.indexOf('Mozilla') != -1) {

		st += 'screenX=' + cw;

		st += ',';

		st += 'screenY=' + ch;

	}

	st += "resizable=0, scrollbars=0, menubar=0, directories=0, status=0, location=0";

	newwindow = window.open(url, 'prof', st);

	newwindow.focus();

}


