



	function subscribe (email, opt){

		if (typeof opt == 'undefined') opt = 'in';

		xml_http = get_xml_http();
		xml_http.onreadystatechange = subscribe_changed;
		xml_http.open ('GET', '/php/subscribe.php?opt=' + opt + '&email=' + email, false);
		xml_http.send (null);
		try {
			if (document.addEventListener && xml_http.onreadystatechange == null) {
				subscribe_changed();
			}
		}
		catch (e) { return false; }

	}



	function subscribe_changed (){

		if (xml_http.readyState == 4 || xml_http.readyState == 'complete'){

			subscribe_notice_show (xml_http.responseText);

		}

	}



	function subscribe_notice_show (message){

		subscribe_notice_hide();

		var scroll = get_scroll_xy();
		scroll.left = scroll[0];
		scroll.top = scroll[1];

		notice = document.createElement('div');
		notice.id = 'notice';
		notice.className = 'notice';
		notice.style.width = 360 + 'px';
		notice.style.height = 84 + 'px';
		notice.style.left = (((parseInt(screen.width) / 2) - (parseInt (notice.style.width) / 2)) + scroll.left) + 'px';
		notice.style.top = (((parseInt(screen.height) / 2) - (parseInt (notice.style.height) / 2))  + scroll.top - 150) + 'px';
		notice.style.position = 'absolute';
		notice.innerHTML = '<p>' + message + '</p><a href="javascript:void(0);" onclick="subscribe_notice_hide();"><img id="notice-close" src="/images/close.gif"></a>';
		document.body.appendChild(notice);


	}



	function subscribe_notice_hide (){

		if (document.getElementById('notice')){

			document.body.removeChild(document.getElementById('notice'));

		}

	}


