
function showpop(url, l, t, w, h) {
var win1 = '';
var win2 = '';
var win3 = '';

if (win1.location && !win1.closed) {
    win1.location.href = url;
    win1.focus(); }
else {
    win1=window.open(url,'a1','resizable=1,scrollbars=1,menubar=0,status=0,toolbar=0,directories=0,location=0,width=' + w + ',height=' + h + ',left=' + l + ', top=' + t);
     }
win1.focus();	 
}


function showpop2(url, l, t, w, h) {
var win1 = '';
var win2 = '';
var win3 = '';

if (!win2.closed && win2.location) {
    win2.location.href = url;
    win2.focus(); 
} else {

    win2=window.open(url,'a2','resizable=1,scrollbars=1,menubar=1,status=1,toolbar=1,directories=0,location=1,width=' + w + ',height=' + h + ',left=' + l + ', top=' + t);
    win2.focus(); 
}
}

function showpop21(url, l, t, w, h) {
var win11 = '';
var win21 = '';
var win31 = '';

if (!win21.closed && win21.location) {
    win21.location.href = url;
    win21.focus(); 
} else {

    win21=window.open(url,'a21','resizable=1,scrollbars=1,menubar=1,status=1,toolbar=1,directories=0,location=1,width=' + w + ',height=' + h + ',left=' + l + ', top=' + t);
    win21.focus(); 
}
}


function showpop22(url, l, t, w, h) {
var win12 = '';
var win22 = '';
var win32 = '';

if (!win22.closed && win22.location) {
    win22.location.href = url;
    win22.focus(); 
} else {

    win22=window.open(url,'a22','resizable=1,scrollbars=1,menubar=1,status=1,toolbar=1,directories=0,location=1,width=' + w + ',height=' + h + ',left=' + l + ', top=' + t);
    win22.focus(); 
}
}



function showpoprnd(url, l, t, w, h) {
var win1 = '';
var win2 = '';
var win3 = '';

var newwin = 'C';

var iii = 0;
var xrnd = 0; 
for (iii = 0; iii < 3; iii++) {
xrnd = Math.floor(Math.random() * (1 + 57 - 48) + 48);
newwin += String.fromCharCode(xrnd);
}

if (!newwin.closed && newwin.location) {
    newwin.location.href = url;
    newwin.focus(); 
} else {
  url += '&wname=';
	url += newwin;  
    newwin=window.open(url,newwin,'resizable=1,scrollbars=1,menubar=0,status=0,toolbar=0,directories=0,location=0,width=' + w + ',height=' + h + ',left=' + l + ', top=' + t);
    newwin.focus(); 
}
}



function showpop3(url, l, t, w, h) {
var win1 = '';
var win2 = '';
var win3 = '';

if (win3.location && !win3.closed) {
    win3.location.href = url;
    win3.focus(); }
else {
    win3=window.open(url,'a3','resizable=1,scrollbars=1,menubar=1,status=1,toolbar=0,directories=0,location=0,width=' + w + ',height=' + h + ',left=' + l + ', top=' + t);
	}
win3.focus();
}


function showpop4(url, l, t, w, h) {
var win1 = '';
var win2 = '';
var win3 = '';

if (win3.location && !win3.closed) {
    win3.location.href = url;
    win3.focus(); }
else {
    win3=window.open(url,'a4','resizable=1,scrollbars=1,menubar=1,status=1,toolbar=0,directories=0,location=0,width=' + w + ',height=' + h + ',left=' + l + ', top=' + t);
	}
win3.focus();
}



function showdiv(divid) {
document.getElementById(divid).style.display = "block";
}

function hidediv(divid) {
document.getElementById(divid).style.display = "none";
}



function updatepic(picfile, pcaption){
document.getElementById('selectedpic').src = picfile;
document.getElementById('selectedcaption').innerHTML = pcaption;
}



