function setLayerVisibility(id,vis){
    if (document.layers && document.layers[id])
        document.layers[id].visibility = (vis)?'visible':'hidden';
    else if (document.all)
        document.all[id].style.visibility =  (vis)?'visible':'hidden';
}

function killPhotographers(){
   try{
	document.getElementById('photog-top').style.display="none";
    } catch (e){}
  try{
	document.getElementById('photog-left').style.display="none";
    } catch (e){}
  try{
	document.getElementById('photog-side').style.display="none";
    } catch (e){}
}

function setLayerLocation(id,x,y){
    if (document.layers && document.layers[id]){
       if(x!=null) document.layers[id].left=x;
       if(y!=null) document.layers[id].top=y;
		}
    else if (document.all){
       if(x!=null) document.all[id].style.posLeft=x;
	   if(y!=null) document.all[id].style.posTop=y;
	}
}

// checks browser version
function checkVersion(x) {
if (navigator.appVersion.charAt(0)>=x) return true;
else return false;
}

// swaps image objects
function swap(obj1,obj2){
if (checkVersion(3))
{
	obj1.src=obj2.src;
}
}

function cmsg(qs){
        msgWin = window.open('/messenger/index.cfm?fuseaction=composeAlias&nickname='+qs,'msgWin', 'width=480,height=310,toolbar=0,location=0,directories=0,status=0,menuBar=0,scrollBars=0,resizable=0');
        if (msgWin.focus) msgWin.focus();
}
function fmsg(qs){
        msgWin = window.open('/messenger/index.cfm?fuseaction=composeFS&nickname='+escape(qs),'msgWin', 'width=480,height=310,toolbar=0,location=0,directories=0,status=0,menuBar=0,scrollBars=0,resizable=0');
        if (msgWin.focus) msgWin.focus();
}

function fsreply(nick,msgid,subject){
        msgWin = window.open('/messenger/index.cfm?fuseaction=composeFS&nickname='+escape(nick)+'&msg='+msgid+'&subject='+escape(subject),'msgWin', 'width=480,height=310,toolbar=0,location=0,directories=0,status=0,menuBar=0,scrollBars=0,resizable=0');
        if (msgWin.focus) msgWin.focus();
}

function pop(win,winName,url,w,h){
        win = window.open(url,winName, 'width='+w+',height='+h+',toolbar=0,location=0,directories=0,status=0,menuBar=0,scrollBars=1,resizable=1');
        if (win.focus) win.focus();
}
