function od(u, w, h, x, y) {
	if (!w) w = 320;
	if (!h) h = 200;
	if (!x) x = (screen.width-w)/2;
	if (!y) y = (screen.height-h)/2;
	var w = window.open(u, "_blank", "resizable=yes,scrollbars=yes,top="+x.toString()+",left="+y.toString()+",width="+w.toString()+",height="+h.toString());
	w.focus();
}

function ow(u, w, h, x, y) {
	od(u, w, h, x, y);
	return false;
}

function e(i, m, a) {
	with(document) {
		write('<div id="m_'+i+'" style="visibility: hidden; float: right"><font class="mp3d"><a href="javascript:void(0);" onclick="javascript:ajax_mp3('+i+')">'+m+'</a> | <a href="javascript:void(0);" onclick="javascript:ajax_album('+i+')">'+a+'</a></font></div>');
		var d = getElementById('d_'+i);
		var m = "document.getElementById('m_"+i+"').style.visibility=";
		d.onmouseover = new Function(m+"'visible'");
		d.onmouseout = new Function(m+"'hidden'");
	}
}

function buton(val, title, op, sub, w) {
	var val, title, op, sub, w;
	document.write("<input onmouseover=\"this.id='butover'\" onmouseout=\"this.id=''\" onmousedown=\"this.id='butdown'\" onmouseup=\"this.id=''\" title=\"");
	document.write(title);
	document.write("\" class=\"but\" type=\"");
	if (sub == 1) { document.write("submit");
	} else { document.write("button"); }
	document.write("\" onclick=\"");
	document.write(op)
	document.write("\" value=\"");
	document.write(val);
	if (w != '') {
		document.write("\" style=\"width:");
		document.write(w);
		document.write("px\">");
	} else {
		document.write("\">");
	}
}

function ad(s, w, h) {
	var s, w, h;
	document.write("<iframe src=\"http://1gg.org/"+s+".php\" width="+w+" height="+h+" marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 scrolling=no></iframe>");
}

function adtech(s, w, h) {
	var s, w, h;
	document.write("<iframe src=\"http://www.bedavamp3.co.uk/include/ads/"+s+".php\" width="+w+" height="+h+" marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 scrolling=no></iframe>");
}

function switch_id(selectobj, type, address) {
	var id = selectobj.options[selectobj.selectedIndex].value;

	if (id == '') {
		return;
	}

	//var url = new String(window.location);
	var url = address;
	var fragment = new String('');

	url = url.split('#');

	if (url[1]) {
		fragment = '#' + url[1];
	}

	url = url[0];

	if (url.indexOf(type + 'ID=') != -1 && is_regexp) {
		re = new RegExp(type + "ID=\\d+&?");
		url = url.replace(re, '');
	}

	if (url.indexOf('?') == -1) {
		url += '?';
	} else {
		lastchar = url.substr(url.length - 1);
		if (lastchar != '&' && lastchar != '?') {
			url += '&';
		}
	}
	window.location = url + type + 'ID=' + id + fragment;
}