function _gel(a){return document.getElementById(a)}
function trim(s){return s.replace(/^\s+/,'').replace(/\s+$/,'');}
function get_random(){var ranNum= Math.round(Math.random()*98929);return ranNum;}
function ColorInput(Obj,CellColor){Obj.style.backgroundColor=CellColor}
function isEmail(string){if(string.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) != -1) return true; else return false;}
function doClear(tx){if(tx.value==tx.defaultValue)tx.value=""}
function donothing(){}
function outFlash(str){document.write(str);}

function vs(f){
	var ftxt=trim(f.elements['ftxt'].value)
	if (ftxt.length < 2) {
		alert('Please supply search trem');
	    document.frms.ftxt.focus();
		return false
	}
	if (ftxt=='Search'){
		document.frms.ftxt.value='';
		return false
	}
	return true
}

function vs1(f){
	var aidI = f.elements['aid'].selectedIndex
	if(aidI==0){
		alert('Choose artist');
	    document.frms.aid.focus();
		return false		
	}
	return true
}

var mxxz = ''
function xma(iid){
	var d=_gel(iid+'')
	if(!d)return
	d.style.color='#1E9FA4'
}
function nw(pg, wn, w, h) {
	var wl = (screen.width - w) / 2;
	var wt = (screen.height - h) / 2;
	wparms = 'top='+wt+',left='+wl+',height='+h+',width='+w+',status=0,statusbar=0,titlebar=0,scrollbars=0,resizable=1'
	win = window.open(pg,wn, wparms)
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

var ignorID = ''
function xx21(iid,p){
	if (ignorID==iid) return
	var d=_gel(iid)
	var imn = d.src
	if(p==1){
		imn = imn.replace('1.gif','2.gif')
	}else{
		imn = imn.replace('2.gif','1.gif')	
	}
	d.src=imn
}

function xx21inX(iid){
	ignorID = iid
	var d=_gel(iid)
	var imn = d.src
	//alert(imn)
	imn = imn.replace('0.gif','1.gif')
	imn = imn.replace('1.gif','0.gif')
	d.src=imn
}
