function tlf(n) {
  window.open('http://www.gulesider.no/gsi/numberSearch.do?drill=&spraak=1&tel='+n)
}

function tlf2kart(n)
{
  window.open('http://kart.gulesider.no/kart/map.c?persons='+n)
}

function update_errorCol(id)
{
  var j=0;

//  alert(document.getElementById("IDC-"+id.toString()).checked);

  if (document.getElementById("IDC-"+id.toString()).checked) j+=1;
  if (document.getElementById("IDM-"+id.toString()).checked) j+=1;
  if (document.getElementById("IDF-"+id.toString()).checked) j+=1;
  if (document.getElementById("IDA-"+id.toString()).checked) j+=1;
  
  if (j==0) { document.images['img' + id.toString()].src="/gimages/error.GIF";}
  if (j==1) { document.images['img' + id.toString()].src="/gimages/OK.GIF";}
  if (j>1)  { document.images['img' + id.toString()].src="/gimages/warning.GIF";}
}
function test1() {
  document.messageForm.msgcounter.value = 40;
}

function openFullScreenFotoUrl(url,URLparam)
{
   window.location.href='http://'+url+'/Default.asp?pageID=SlideShow&' + URLparam;

//   window.open('http://'+url+'/include/slide.asp?' + URLparam, '', 'fullscreen=yes, width="100%", height="100%",statusbar=no, menubar=no, toolbar=no, scrollbar=no,resizable=no');
}

function fullScreenFotoSlideShowUrl(url,slideShowID){openFullScreenFotoUrl(url,'sqlID=SlideShow&slideShowID=' + slideShowID);}
function fullScreenFotocsIDUrl(url,ArrangementID,csID){if(ArrangementID==0) {openFullScreenFotoUrl(url,'sqlID=Random');} else {if (ArrangementID<0){fullScreenFotoSlideShowUrl(url,0-ArrangementID);} else { openFullScreenFotoUrl(url,'sqlID=Arrangement&ArrangementID=' + ArrangementID +'&csID='+csID);}}}
function fullScreenFotoUrl(url,ArrangementID){fullScreenFotocsIDUrl(url,ArrangementID,0);}



function openFullScreenFoto(URLparam)
{
  window.location.href='/Default.asp?pageID=SlideShow&' + URLparam;
}


function fullScreenFotocsID(ArrangementID,csID){if(ArrangementID==0) {openFullScreenFoto('sqlID=Random');} else {if (ArrangementID<0){fullScreenFotoSlideShow(0-ArrangementID);} else { openFullScreenFoto('sqlID=Arrangement&ArrangementID=' + ArrangementID +'&csID='+csID);}}}
function fullScreenFoto(ArrangementID){fullScreenFotocsID(ArrangementID,0);}


function fullScreenFotoMember(memberID){openFullScreenFoto('sqlID=Member&memberID=' + memberID);}

function fullScreenFotoSlideShow(slideShowID){openFullScreenFoto('sqlID=SlideShow&slideShowID=' + slideShowID);}
function fullScreenFotoFotoIDTitle(photoID,Title){openFullScreenFoto('sqlID=photoID&photoID=' + photoID+'&Title='+Title);}
function fullScreenFotoFotoID(photoID){fullScreenFotoFotoIDTitle(photoID,'');}
function fullScreenFotoFotoID2FotoIDTitle(fromPhotoID,toPhotoID,Title){openFullScreenFoto('sqlID=photoID2photoID&fromPhotoID=' + fromPhotoID+'&toPhotoID='+toPhotoID+'&Title='+Title);}
function fullScreenFotoFotoID2FotoID(fromPhotoID,toPhotoID){fullScreenFotoFotoID2FotoIDTitle(fromPhotoID,toPhotoID,'');}
function fullScreenFotoDate2DateTitle(fromDate,toDate,Title){openFullScreenFoto('sqlID=date2date&fromDate=' + fromDate+'&toDate='+toDate+'&Title='+Title);}
function fullScreenFotoDate2Date(fromDate,toDate){fullScreenFotoDate2DateTitle(fromDate,toDate,'');}
function fullScreenFotoEventAndPhotographer(ArrangementID,CreatedBy){openFullScreenFoto('sqlID=ArrangementAndCreatedBy&ArrangementID=' + ArrangementID+'&CreatedBy='+CreatedBy);}
function fullScreenFotoYear(year){openFullScreenFoto('sqlID=Year&Year=' + year);}


function deletePicture(id)
{
  if(confirm('Slett bilde ' + id ))
  {
    window.location='/Default.asp?PageID=EditPhoto&GB=1&noHtml=1&Action=DeletePictureOK&Foto='+id;
  }
}
