function PopUpSlideshow(URL) { 
	day = new Date();
	id = day.getTime();
	eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,width=1015,height=710,left = 0,top = 0');");
}

function CheckAllDown() {
    for (var x=0; x<document.frmUserDownloads.elements.length; x++)
    {
        var y = document.frmUserDownloads.elements[x];
        if (y.name!="AllDownLoads") y.checked=document.frmUserDownloads.AllDownLoads.checked;
    }
}

function CheckAllPics() {
    for (var x=0; x<document.frmDownloadPics.elements.length; x++)
    {
        var y = document.frmDownloadPics.elements[x];
        if (y.name!="AllDownLoads") y.checked=document.frmDownloadPics.AllDownLoads.checked;
    }
}

function CheckAll(SearchForm,SourceChkBox,DestChkBox) {
	for(var x=0; x<document.forms[SearchForm].elements.length; x++)
	{
		var y = document.forms[SearchForm].elements[x];
       	if (y.name.match(DestChkBox + "*")) y.checked=document.forms[SearchForm].elements[SourceChkBox].checked;
    }
}

function SelectContact() {

	var index = 0;
    var separator = document.forms["SendPic"].SelContact.options[document.forms["SendPic"].SelContact.selectedIndex].value.indexOf("#",index);

	var length = document.forms["SendPic"].SelContact.options[document.forms["SendPic"].SelContact.selectedIndex].value.length;
    var friend = document.forms["SendPic"].SelContact.options[document.forms["SendPic"].SelContact.selectedIndex].value.substring(index,separator);
    var email = document.forms["SendPic"].SelContact.options[document.forms["SendPic"].SelContact.selectedIndex].value.substring(separator+1,length);

    document.forms["SendPic"].EmpfEmail.value= email;
    document.forms["SendPic"].EmpfName.value= friend;

}
