function openPopup(url,name,width,height) {
	var popupWin = top[name];
	if (popupWin != null && typeof(popupWin) == 'object' && !popupWin.closed) {
		if (popupWin.document.location.href != url) {
			popupWin.document.location.href = url;
		}
	} else {
		popupWin = window.open(url, name, 'width=' + width + ',height=' + height + 'status=yes,menubar=yes,resizable=yes,scrollbars=yes, left=' + String((screen.width-width)/2) + ',top=' + String((screen.height-height)/2));
	}
	popupWin.focus();
}

function closePopup(url) {
	if (opener) {
		if (opener.closed) window.open(url, "");
		self.close();
		return false;
	}
	return true;
}

function wopen(url,name,w,h){
	opened = window.open(url,name,"top=100,left=100,width="+w+",height="+h+",resizable=1,scrollbars=1,menubar=0");
	opened.document.open();
	opened.document.write('<html>\n');
	opened.document.write('<head></head>\n');
	opened.document.write('<body style="margin:0; padding:0;">\n');
	opened.document.write('<img src="'+url+'" alt="" />\n');
	opened.document.write('</body>\n');
	opened.document.write('</html>');
	opened.document.close();
}

function wopen2(url,name,w,h){
	window.open(url,name,"top=100,left=100,width="+w+",height="+h+",status=yes,menubar=yes,resizable=yes,scrollbars=yes");
}

function openMess(url,name,width,height) {
	var popupWin = top[name];
	if (popupWin != null && typeof(popupWin) == 'object' && !popupWin.closed) {
		if (popupWin.document.location.href != url) {
			popupWin.document.location.href = url;
		}
	} else {
		popupWin = window.open(url, name, 'width=' + width + ',height=' + height + 'status=yes,menubar=yes,resizable=yes,scrollbars=yes, left=' + String((screen.width-width)/2) + ',top=' + String((screen.height-height)/2));
	}
	popupWin.focus();
}

function closePopup(url) {
	if (opener) {
		if (opener.closed) window.open(url, "");
		self.close();
		return false;
	}
	return true;
}

function mapsh(obj){
	var map = document.getElementById(obj);
	if (map.style.display == 'none'){
		map.style.display = 'block';
	}else{
		map.style.display = 'none';
	}
}