
//link

window.onload = function() {
	var node_a = document.getElementsByTagName('a');
		for (var i in node_a) {
			if (node_a[i].className == 'popup') {
				node_a[i].onclick = function() {
					return winOpen(this.href)
				};
			}
		}
};

function winOpen(url) {
	window.open(
	url,'popup',
	'width=800,height=600,scrollbars=1,resizable=1');

	return false;
};

/*window.onload = function (){
	var node_a = document.getElementsByTagName('a');
		for (var i in node_a) {
			if(node_a[i].className == 'popup'){
				node_a[i].onclick = function() {
					return winOpen(this.href, this.rel)
				};
			}
		}
} ;

function winOpen(url, rel) {
	var split = rel.split(',') ;
	window.open(
	url,'popup',
	'width='+ split[0] +',height='+ split[1] +',toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes');

	return false;
};
*/


// page close
function close_win(){
var nvua = navigator.userAgent;
if(nvua.indexOf('MSIE') >= 0){
if(nvua.indexOf('MSIE 5.0') == -1) {
top.opener = '';
}
}
else if(nvua.indexOf('Gecko') >= 0){
top.name = 'CLOSE_WINDOW';
wid = window.open('','CLOSE_WINDOW');
}
top.close();
}
