/////////////////////////////////////////////
//YOUR GOOD OLD POPUP
/////////////////////////////////////////////
var popUpWin=0;

function popUpWindow(URLStr, left, top, width, height)

{

  if(popUpWin)

  {

    if(!popUpWin.closed) popUpWin.close();

  }

  popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');

}

/////////////////////////////////////////////
//CLOSE CHANGE IMAGE CHILD WINDOW - REFRESH PARENT WINDOW
/////////////////////////////////////////////
<!--
function winImageChanged(){
window.opener.location.href="seriesdetails.asp";
self.close();
//-->
}

/////////////////////////////////////////////
//CLOSE ADD IMAGES POPUP WINDOW - REFRESH PARENT WINDOW
/////////////////////////////////////////////
<!--
function winImagesAdded(){
window.opener.location.href="seriesdetails.asp";
self.close();
//-->
}





/////////////////////////////////////////////
//VALIDATING THE CREATE NEW SERIES FORM
/////////////////////////////////////////////
function valFRMNewSeries()	{
	msg = "Following fields need filling in: \n\n"
	formOk = true;
	if (document.FRMNewSeries.strSeriesTitle.value=="") {
		msg += "Name of the New Series.\n"
		formOk = false;
	}
	if (document.FRMNewSeries.strSeriesText.value=="") {
		msg += "A little bit of text, for Nice To Have Just In Case purposes.\n"
		formOk = false;
	}
	msg += "\n\n [Yellow1 CMS]"
	if(formOk)
		return true;
	else {
		alert(msg);
	return false;		
	}
}


/////////////////////////////////////////////
//VALIDATING THE EDIT SERIES TEXT FORM
/////////////////////////////////////////////
function valFrmUpdateSeriesText()	{
	msg = "You can't have an empty text box. Be creative... \n\n [Yellow1 CMS]"
	formOk = true;
	if (document.FRMUpdateSeriesText.strGalleryTitle.value=="") {
		//msg += "Name of the New Series.\n"
		formOk = false;
	}
	if (document.FRMUpdateSeriesText.strGalleryText.value=="") {
		//msg += "A little bit of text, for Nice To Have Just In Case purposes.\n"
		formOk = false;
	}
	if(formOk)
		return true;
	else {
		alert(msg);
	return false;		
	}
}

/////////////////////////////////////////////
//VALIDATING THE EDIT IMAGE TEXT FORM
/////////////////////////////////////////////
function valFrmUpdateImageText()	{
	msg = "You can't have an empty text box. Be creative... \n\n [Yellow1 CMS]"
	formOk = true;
	if (document.FRMUpdateImageText.strImageTitle.value=="") {
		//msg += "Name of the New Series.\n"
		formOk = false;
	}
	if (document.FRMUpdateImageText.strImageText.value=="") {
		//msg += "A little bit of text, for Nice To Have Just In Case purposes.\n"
		formOk = false;
	}
	if(formOk)
		return true;
	else {
		alert(msg);
	return false;		
	}
}

/////////////////////////////////////////////
//CLOSE (DE)ACTIVATE IMAGE WINDOW - REFRESH PARENT WINDOW
/////////////////////////////////////////////
<!--
function winActivatedImage(){
window.opener.location.href="seriesdetails.asp";
self.close();
//-->
}

/////////////////////////////////////////////
//CLOSE (DE)ACTIVATE CHILD WINDOW - REFRESH PARENT WINDOW
/////////////////////////////////////////////
<!--
function winActivated(){
window.opener.location.href="default.asp";
self.close();
//-->
}

/////////////////////////////////////////////
//CLOSE (DE)ACTIVATE CHILD WINDOW - REFRESH PARENT WINDOW
/////////////////////////////////////////////
<!--
function winImageAdded(){
window.opener.location.href="shootdetails.asp";
self.close();
//-->
}

/////////////////////////////////////////////
//CLOSE REMOVE IMAGE CHILD WINDOW - REFRESH PARENT WINDOW
/////////////////////////////////////////////
<!--
function winImageGone(){
window.opener.location.href="shootdetails.asp";
self.close();
//-->
}




/////////////////////////////////////////////
//MOVE UP AND DOWN START
/////////////////////////////////////////////
function move(to) { 
	var list = document.form.sORN; 
	var total = list.options.length-1; 
	index = list.selectedIndex;
	if (index == -1) return false; 
	if (to == +1 && index == total) return false; 
	if (to == -1 && index == 0) return false; 
	var items = new Array; 
	var values = new Array; 
	for (i = total; i >= 0; i--) { 
		items[i] = list.options[i].text; 
		values[i] = list.options[i].value; 
	} 
	for (i = total; i >= 0; i--) { 
		if (index == i) { 
			list.options[i + to] = new Option(items[i],values[i], 0, 1); 
			list.options[i] = new Option(items[i + to], values[i + to]); 
			i--; 
		} else { 
			list.options[i] = new Option(items[i], values[i]); 
		} 
	} 
list.focus(); 
} 


function validate(theForm)
{
	obj = document.getElementById('sORN') ;
	listLen = obj.length;
	sNYORN = "";
	
	for(i=0; i<listLen; i++)
			sNYORN = sNYORN + "," + obj.options[i].value;
	
	if(sNYORN.length > 0)
			sNYORN = sNYORN.substring(1,sNYORN.length);
	
	document.getElementById('sNYORN') .value= sNYORN;
	return true;
}

/////////////////////////////////////////////
//MOVE UP AND DOWN STOP
/////////////////////////////////////////////
