/* Sybron Dental Specialties  -  script.css
----------------------------------------------- */

var popbox = {
	over: function() {
		tgt = getElementPos(document.getElementById('pop-link'));
		box = document.getElementById('pop-box');
		box.style.left = tgt.x + 150 + 'px';
		box.style.top = tgt.y - 20 + 'px';
		box.style.display = 'block';
	},
	out: function() {
		box = document.getElementById('pop-box');
		box.style.display = 'none';
	},
	write: function() {
		str  = '<p>';
		str += '<strong>メンバーについて</strong><br />';
//		str += 'ご登録の方にはセミナー情報や新製品のご案内をさせていただきます。<br />今後、メンバー専用のスペシャルコンテンツも順次検討中ですので、ぜひご登録ください。<br />尚、オームコ製品については、メンバー登録をしていただく事でWebからのご注文が可能となります。';
		str += 'ご登録の方にはセミナー情報や新製品のご案内をさせていただきます。<br />今後、メンバー専用のスペシャルコンテンツも順次検討中ですので、ぜひご登録ください。';
		str += '</p>';
		document.getElementById('pop-box').innerHTML = str;
	}
}

////////// get the element's position (caluculating from the corner of the screen)
function getElementPos(element) {
	var obj = new Object();
	obj.w = element.offsetWidth;
	obj.h = element.offsetHeight;
	obj.x = element.offsetLeft;
	obj.y = element.offsetTop;
	while(element.offsetParent) {
		element = element.offsetParent;
		obj.x += element.offsetLeft;
		obj.y += element.offsetTop;
	}
	return obj;
}


///////// popup message for the restricted page
function restricted(url) {
	url = url ? url : "../member/msg.html";
	option = 'width=340,height=200,left=' + (window.screen.width-300)/2 + ',top=' + (window.screen.height-300)/2;
	window.open(url,'pop_sybron',option);
}

function popclose(url) {
	if (!window.opener || window.opener.closed) window.open(url,'new_sybron');
	else window.opener.location.href = url;
	window.close();
}
