// JavaScript Document

function roll(a) {
	a.style.cursor='pointer';
	if (a.className.substr((a.className.length-1),1) == 'n') {b='o';}
	else {b='n';}
	a.className=a.className.substr(0,(a.className.length-1))+b;
}

function rollId(a) {
	a.style.cursor='pointer';
	if (a.id.substr((a.id.length-1),1) == 'n') {b='o';}
	else {b='n';}
	a.id=a.id.substr(0,(a.id.length-1))+b;
}

function rollimg(a) {
	a.style.cursor='pointer';
	ext = a.src.substr((a.src.length-4),4);
	state = a.src.substr((a.src.length-6),2);
	if (state == '_o')
		a.src=a.src.substr(0,(a.src.length-6))+'_n'+ext;
	else
		a.src=a.src.substr(0,(a.src.length-6))+'_o'+ext;
}

function openWindow(url, w, h, win, x, y) {
	var win_name = win ? win : 'popup';
	if (! x) x = 0;
	if (! y) y = 0;
	if (! w) w = 600;
	if (! h) h = 600;
	var new_win = window.open(url, win_name, 'left='+x+',top='+y+',width='+w+',height='+h+',menubar=no,toolbar=no,location=no,scrollbars=yes,resizable=yes,status=yes');
	if (new_win) {
		new_win.moveTo(x, y);
		new_win.resizeTo(w, h);
		new_win.focus();
	}
}
