function moreInfo(){
return overlib('Klicka för info');
}

function oI(id){
window.open('extras/info.asp?pid=' +id,'pinfo','toolbar=0,resizable=1,scrollbars=1,width=360,height=300');
}


function setField(field,txt){
   if(field.value == txt){ 
   field.value = '';""
   } else if(field.value == '') {
   field.value = txt;
   }
}


function cA(txt,url){
   if(confirm(txt)) self.location.href=url;
}



function setLB(txt){
txt = String(txt);
var pos = txt.indexOf('\\n');
	while(pos >= 0){
	txt = txt.substring(0,pos)+ '<br />' +txt.substring(pos+2);
	pos = txt.indexOf('\\n');
	}
return txt;
}

function requestPassword(){
var rPass = window.open('extras/requestPassword.asp','rPwd','toolbar=0,resizable=0,scrollbars=1,width=300,height=220');
rPass.focus();
return rPass;
}


function mLogin(){
var aL = confirm('Vill du bli automatiskt inloggad vid nästa besök?');
	if(aL) document.forms['mForm'].autoLogin.value = 1;

return true;
}


function selChan(id,x){
//alert('id: ' +id+ '\nx:  ' +x);
var imgs = document.getElementsByTagName('img');
if(x > 0){
var ix = x-1;
} else {
var ix = x;
}

	for(var i=0; i<imgs.length; i++){
		if(String(imgs[i].name).substring(0,4) == 'chan'){
			if(imgs[i].name == 'chan' +id){
				if(imgs[i].className == 'activeChan'){ 
				imgs[i].className = 'inactiveChan';
				document.forms['chanForm'].userChans[ix].checked = false;
				document.getElementById('cTD1' +x).style.backgroundColor = '#E5E8ED';
				document.getElementById('cTD2' +x).style.backgroundColor = '#CBD1D9';
				} else {
				imgs[i].className = 'activeChan';
				document.forms['chanForm'].userChans[ix].checked = true;
				document.getElementById('cTD1' +x).style.backgroundColor = '#CCD3DC';
				document.getElementById('cTD2' +x).style.backgroundColor = '#BAC2CD';
				}
			}
		}
	}
}


