
<!--
function confirmFunc(map,coords1,coords2,coords3,coords4,uid,hotspot,mark)
{

var confirmStat= confirm("Are you sure want to delete the Hotspot.");

if (confirmStat == true)
   {

   		window.location="editor.php?id="+uid+"&mark="+mark+"&hotspot="+hotspot+"&size="+coords1+","+coords2+","+coords3+","+coords4+"&del_map="+map;
   
   }
   
}

function confirm_back(id,page)
{

var confirmStat= confirm("Are you sure want to remove the background image.");

if (confirmStat == true)
   {

   		window.location="change_background.php?id="+id+"&chg=2&del_back=1&pagename="+page+"";
   
   }
   
}

function remove_text(id,page)
{

var confirmStat= confirm("Are you sure want to remove the Welcome Text.");

if (confirmStat == true)
   {

   		window.location="index_text.php?id="+id+"&do=delete&pagename="+page+"";
   
   }
   
}


function confirmdel(id)
{

var confirmStat= confirm("Are you sure want to delete the Magazine.");

if (confirmStat == true)
   {

   		window.location="index.php?delmag=1&id="+id;
   
   }
   
}

function confirmEditDel(id)
{

var confirmStat= confirm("Are you sure want to delete the Magazine.");

if (confirmStat == true)
   {

   		window.location="edit_mag.php?delmag=1&id="+id;
   
   }
   
}


function confirmEditUpload(id)
{

var confirmStat= confirm("Are you sure want to delete the Magazine.");

if (confirmStat == true)
   {

   		window.location="resume_uploads.php?delmag=1&id="+id;
   
   }
   
}

function confirmEditTemplate(id)
{

var confirmStat= confirm("Are you sure want to delete the Template.");

if (confirmStat == true)
   {

   		window.location="standard_setup.php?delmag=1&id="+id;
   
   }
   
}

function Del_PDF(id)
{

var confirmStat= confirm("Are you sure want to remove the PDF Download.");

if (confirmStat == true)
   {

   		window.location="menu_functions.php?delpdf=1&id="+id;
   
   }
   
}


function confirmDelete(id)
{

var confirmStat= confirm("Are you sure want to delete the Magazine.");

if (confirmStat == true)
   {

   		window.location="del_mag.php?delmag=1&id="+id;
   
   }
   
}



function editFunc(id,uid,page)
{

var confirmStat= confirm("Are you sure want to delete the Index Element.");

if (confirmStat == true)
   {

   		window.location="flash_index_editor.php?id="+uid+"&title="+id+"&del=1&pagename="+page+"";
   
   }
   
}
//-->

    
    <!-- ;
    
    // Color Chooser 1.2 - 2003-01-10
    //
    // Free JavaScript code provided by SysCo.ch
    //
    // javascript@sysco.ch
    
    cellsize = 4;
    colorstep = 16; // Perfect square please !
    
    substep = Math.ceil(Math.sqrt(colorstep));
    corrector = 255/(colorstep-1);

    red   = 0
    green = 0
    blue  = 0

    redH   = '00'
    greenH = '00'
    blueH  = '00'


    function HexToDec(Code)
    {
      result = 0
      refDec='0123456789ABCDEF'
      for (var posCode = 0; posCode < Code.length; posCode++)
      {
        currentCode = Code.substring(posCode,posCode+1).toUpperCase();
        posDec = refDec.indexOf(currentCode);
        if (posDec < 0)
        {
          posDec=0;
        }
        result = result * 16 + posDec;
      }
      return result;
    }


    function Calculate()
    {
      red=HexToDec(document.SelectColor.red.value);
      green=HexToDec(document.SelectColor.green.value);
      blue=HexToDec(document.SelectColor.blue.value);
      calculateColor();
    }


    function RedP(value)
    {
      red=red+value;
      calculateColor()
    }


    function RedM(value)
    {
      red=red-value;
      calculateColor()
    }


    function GreenP(value)
    {
      green=green+value;
      calculateColor()
    }


    function GreenM(value)
    {
      green=green-value;
      calculateColor()
    }


    function BlueP(value)
    {
      blue=blue+value;
      calculateColor()
    }


    function BlueM(value)
    {
      blue=blue-value;
      calculateColor()
    }


    function SetColor(cell)
    {
      selectColor = cell.bgColor.substring(1,7).toUpperCase();

      redH = selectColor.substring(0,2);
      greenH = selectColor.substring(2,4);
      blueH = selectColor.substring(4,6);

      red = HexToDec(redH);
      green = HexToDec(greenH);
      blue = HexToDec(blueH);
      calculateColor();
    }


    function OverColor(cell)
    {
      actualColor = cell.bgColor.toUpperCase();

      redH = actualColor.substring(1,3);
      greenH = actualColor.substring(3,5);
      blueH = actualColor.substring(5,7);

      document.all.sampleO.bgColor = cell.bgColor;
      document.SelectColor.actualcolor.value = redH + greenH + blueH;
    }


    function calculateColor()
    {
      if (red>255)
      {
        red=255
      }
      else if (red<0)
      {
        red=0
      }
      if (green>255)
      {
        green=255
      }
      else if (green<0)
      {
        green=0
      }
      if (blue>255)
      {
        blue=255
      }
      else if (blue<0)
      {
        blue=0
      }
      redH = '00' + red.toString(16).toUpperCase();
      redH = redH.substring(redH.length-2,redH.length);
      greenH = '00' + green.toString(16).toUpperCase();
      greenH= greenH.substring(greenH.length-2,greenH.length);
      blueH = '00' + blue.toString(16).toUpperCase();
      blueH = blueH.substring(blueH.length-2,blueH.length);

      document.SelectColor.red.value   = redH;
      document.SelectColor.green.value = greenH;
      document.SelectColor.blue.value  = blueH;
      document.SelectColor.fullcolor.value = redH + greenH + blueH;
      document.SelectColor.actualcolor.value = redH + greenH + blueH;

      document.all.sample.bgColor = redH + greenH + blueH;
      document.all.sampleO.bgColor = redH + greenH + blueH;
    }


    function CreateColorTable()
    {
  
      document.write('<TABLE CELLSPACING="0" CELLPADDING="0" BORDER="0">');
    
      for (var l0 = 0; l0 <= (colorstep-1); l0++)
      {
        for (var l1 = 0; l1 <= (substep-1); l1++)
        {
          document.write('<TR>');
          for (var l2 = 0; l2 <= (colorstep-1); l2++)
          {
            for (var l3 = 0; l3 <= (substep-1); l3++)
            {
              red = Math.round(l0 * corrector);
              green = Math.round(l2 * corrector);

              if (((l0/2)-Math.round(l0/2)) != 0)
              {
                nicel1 = ((substep-1)-l1)
              }
              else
              {
                nicel1 = l1
              }

              if (((l2/2)-Math.round(l2/2)) != 0)
              {
                nicel3 = ((substep-1)-l3)
              }
              else
              {
                nicel3 = l3
              }

              blue = Math.round((nicel1+nicel3*substep) * corrector);

              color = (((red * 256) + green) * 256) + blue;
              
              colorHex = '000000' + color.toString(16).toUpperCase();
              colorHex = colorHex.substring(colorHex.length-6,colorHex.length);

              cellCode = ' onMouseDown="SetColor(this);" onMouseOver="OverColor(this)"'
              document.write('<TD bgcolor="' + colorHex + '" width="' + cellsize + '" height="' + cellsize + '"' + cellCode + '></TD>');
            }
          }
          document.write('</TR>');
        }
      }

      document.write('</TABLE>');

    }
    
    // -->
    
  

 function check_form(edit_form,serial)
{
	
// check to see if the field is blank

	

	
	// check to see if the field is blank
	if (edit_form.pagenumber.value == "")
	{
	alert("Please specify the page number.");
	edit_form.pagenumber.focus();
	return (false);
	}
	
	var str = edit_form.pagenumber.value;
	var check = "";
	for(i=0 ; i < str.length ;i++)
	{
		check = check+"[0-9]";
	}
	
	var illegalChars = /[\W_(a-z)(A-Z)]/;
	
	// check to see if the field is blank
	if (edit_form.pagenumber.value > serial || edit_form.pagenumber.value <= 0 || illegalChars.test(edit_form.pagenumber.value))
	{
	alert("Please specify the Correct page number.");
	edit_form.pagenumber.focus();
	return (false);
	}
	
		if (edit_form.title.value == "")
	{
	alert("Please specify the title.");
	edit_form.title.focus();
	return (false);
	}
	
	
	
	
}
	
   

 function check(edit_form)
{
// check to see if the field is blank
	if (edit_form.title.value == "")
	{
	alert("Please specify the title.");
	edit_form.title.focus();
	return (false);
	}
	
	
		
}



function refer_validate(theForm)
{
// check to see if the field is blank
	if (theForm.yourname.value == "" || theForm.yourname.value == "your name...")
	{
	alert("Please enter your name.");
	theForm.yourname.focus();
	return (false);
	}
	
	// check to see if the field is blank
	if (theForm.youremail.value == "" || theForm.youremail.value == "your email...")
	{
	alert("Please enter your email address.");
	theForm.youremail.focus();
	return (false);
	}
	
	
	// test if valid email address, must have @ and .
var checkEmail = "@.";
var checkStr = theForm.youremail.value;
var EmailValid = false;
var EmailAt = false;
var EmailPeriod = false;
for (i = 0;  i < checkStr.length;  i++)
{
ch = checkStr.charAt(i);
for (j = 0;  j < checkEmail.length;  j++)
{
if (ch == checkEmail.charAt(j) && ch == "@")
EmailAt = true;
if (ch == checkEmail.charAt(j) && ch == ".")
EmailPeriod = true;
	  if (EmailAt && EmailPeriod)
		break;
	  if (j == checkEmail.length)
		break;
	}
	// if both the @ and . were in the string
if (EmailAt && EmailPeriod)
{
		EmailValid = true
		break;
	}
}
	if (!EmailValid)
	{
	alert("Please enter a valid email address.");
	theForm.youremail.focus();
	return (false);
	}
	
	
	// check to see if the field is blank
	if (theForm.friendname.value == "" || theForm.friendname.value == "friend's name...")
	{
	alert("Please enter your friends name.");
	theForm.friendname.focus();
	return (false);
	}
	
	// check to see if the field is blank
	if (theForm.friendemail.value == "" || theForm.friendemail.value == "friend's email...")
	{
	alert("Please enter your friends email address.");
	theForm.friendemail.focus();
	return (false);
	}
	
	

	
	// test if valid email address, must have @ and .
var checkEmail = "@.";
var checkStr = theForm.friendemail.value;
var EmailValid = false;
var EmailAt = false;
var EmailPeriod = false;
for (i = 0;  i < checkStr.length;  i++)
{
ch = checkStr.charAt(i);
for (j = 0;  j < checkEmail.length;  j++)
{
if (ch == checkEmail.charAt(j) && ch == "@")
EmailAt = true;
if (ch == checkEmail.charAt(j) && ch == ".")
EmailPeriod = true;
	  if (EmailAt && EmailPeriod)
		break;
	  if (j == checkEmail.length)
		break;
	}
	// if both the @ and . were in the string
if (EmailAt && EmailPeriod)
{
		EmailValid = true
		break;
	}
}
	if (!EmailValid)
	{
	alert("Please enter a valid email address for your friend.");
	theForm.friendemail.focus();
	return (false);
	}
	
	
	
	
	
	// check to see if the field is blank
	if (theForm.friendfone.value == "" || theForm.friendfone.value == "your friend's phone number...")
	{
	alert("Please enter your friends telephone number.");
	theForm.friendfone.focus();
	return (false);
	}
}

function validate(theForm)
{
// check to see if the field is blank
	if (theForm.yourname.value == "" || theForm.yourname.value == "your name...")
	{
	alert("Please enter your name.");
	theForm.yourname.focus();
	return (false);
	}
	
	// check to see if the field is blank
	if (theForm.youremail.value == "" || theForm.youremail.value == "your email...")
	{
	alert("Please enter your email address.");
	theForm.youremail.focus();
	return (false);
	}
	
	
	
// test if valid email address, must have @ and .
var checkEmail = "@.";
var checkStr = theForm.youremail.value;
var EmailValid = false;
var EmailAt = false;
var EmailPeriod = false;
for (i = 0;  i < checkStr.length;  i++)
{
ch = checkStr.charAt(i);
for (j = 0;  j < checkEmail.length;  j++)
{
if (ch == checkEmail.charAt(j) && ch == "@")
EmailAt = true;
if (ch == checkEmail.charAt(j) && ch == ".")
EmailPeriod = true;
	  if (EmailAt && EmailPeriod)
		break;
	  if (j == checkEmail.length)
		break;
	}
	// if both the @ and . were in the string
if (EmailAt && EmailPeriod)
{
		EmailValid = true
		break;
	}
}
	if (!EmailValid)
	{
	alert("Please enter a valid email address.");
	theForm.youremail.focus();
	return (false);
	}
	

}

<!-- InstanceEndEditable -->



<!--
function Validate(form,count) {
    var v = new RegExp();
    v.compile("http://[A-Za-z0-9-_]+\\.[A-Za-z0-9-_%&\?\/._=]+$");
  
    var d = new RegExp();
    d.compile("ftp://[A-Za-z0-9-_]+\\.[A-Za-z0-9-_%&\?\/._=]+$");
    
    
    
    var check = "";
    
    
    var str = form["link"].value;
    
    var point = str.lastIndexOf(",");
    
    var cut = str.substring(point+1);
    
    
    var len = cut.length;
    
   
    for(i=0 ; i < len ;i++)
	{
		check = check+"[0-9]";
	}
    
    var f = new RegExp();
    f.compile("asfunction:gotoPage,"+check+"$");
   
    
    if (form["link"].value == "") {
        alert("You must supply a Link.");
        return false;
    }
    
    
   
    
    
    if (v.test(form["link"].value) || d.test(form["link"].value) || f.test(form["link"].value))
    {
     	if (f.test(form["link"].value))
     	{
     				
					var str1 = form["link"].value;
    
    				var point1 = str1.indexOf(",");
    
    				var cut1 = str1.substring(0,point);
    				var len1 = cut1.length;
    				if(len1>19)
    				{
    				alert("You must supply a valid Link.");
        			return false;
    				}
    				
    				var illegalChars = /[\W_(a-z)(A-Z)]/;
					// check to see if the field is blank
					if (cut > count || cut.value <= 0 || illegalChars.test(cut))
					{
						alert("Please specify the Correct page number.");
						return (false);
					}
					
    				
					
     	}
    
     	if(v.test(form["link"].value)) 	
     	{
     	  	str = form["link"].value;
    
    		point = str.indexOf("://");
    
    		cut = str.substring(0,point);
    		len = cut.length;
    		if(len>4)
    		{
    			alert("You must supply a valid Link.");
        		return false;
    		}
     	}
     	
     	if(d.test(form["link"].value)) 	
     	{
     	  	str = form["link"].value;
    
    		point = str.indexOf("://");
    
    		cut = str.substring(0,point);
    		len = cut.length;
    		if(len>3)
    		{
    			alert("You must supply a valid Link.");
        		return false;
    		}
     	}
     	
    
    }    
    else
    {
    			alert("You must supply a valid Link.");
        		return false;
    }
  
}
//-->




<!--
function help_validate(form) {
    var v = new RegExp();
    v.compile("http://[A-Za-z0-9-_]+\\.[A-Za-z0-9-_%&\?\/._=]+$");
  
    var d = new RegExp();
    d.compile("ftp://[A-Za-z0-9-_]+\\.[A-Za-z0-9-_%&\?\/._=]+$");
    
    if (form["link_count"].value == "") {
        alert("You must supply a link.");
        return false;
    }
       
    
    if (v.test(form["link_count"].value) || d.test(form["link_count"].value))
    {
	
    		if(v.test(form["link_count"].value)) 	
     	{
     	  	var str = form["link_count"].value;
    
    		var point = str.indexOf("://");
    
    		var cut = str.substring(0,point);
    		var len = cut.length;
    		if(len>4)
    		{
    			alert("You must supply a valid Link.");
        		return false;
    		}
     	}
     	
     	if(d.test(form["link_count"].value)) 	
     	{
     	  	var str = form["link_count"].value;
    
    		var point = str.indexOf("://");
    
    		var cut = str.substring(0,point);
    		var len = cut.length;
    		if(len>3)
    		{
    			alert("You must supply a valid Link.");
        		return false;
    		}
     	}
    
    
	}
	else
	{
	
		alert("You must supply a valid Link.");
        return false;
	
	}
   
   
     if (form["link_text"].value == "") {
        alert("You must supply some text for the link.");
        return false;
    }
   
  
}
//-->




 function validate_form(edit_form)
{
	// check to see if the field is blank
	if (edit_form.menu_title.value == "")
	{
	alert("The menu title cannot be empty.");
	edit_form.menu_title.focus();
	return (false);
	}
	
	// check to see if the field is blank
	if (edit_form.menu_link.value == "")
	{
	alert("You must specify a link for the menu item.");
	edit_form.menu_link.focus();
	return (false);
	}	
}

function confirm_remove()
{
	var confirmStat= confirm("Are you sure want to remove these menu items.");

	if (confirmStat == true)
   {

   		document.rem_form.submit();   
   }
   
}
<!--

function html_GetElement(nd){

switch(typeof (nd)){
case 'string':node = document.getElementById(nd);break;
case 'object':node = nd;break;
default:node = null;break;
}
return node;
}

function html_CascadeUpTill(START,TAG){
var node = html_GetElement(START);
if(node){
var node = node.parentNode;
while(node.nodeName != TAG){
node = node.parentNode;
}
}
return node;
}



/*- hides given node */
function html_HideElement(nd){
var node = html_GetElement(nd);
node.style.display = "none";
return node
}
/*- show given node */
function html_ShowElement(nd){
var node = html_GetElement(nd);
node.style.display = "";
return node
}

/*- toggle node visibility */
function html_ToggleElement(nd){
var node = html_GetElement(nd);
if(node.style.display == "none"){html_ShowElement(node)}
else{html_HideElement(node)}
return node
}

var g_LastRowOpened = false;
var g_LastDetailLabel = false;
var g_ShowOnlyOne = false;


function showdetail(t,i){
var l_TR = html_CascadeUpTill(t,'TR');
var l_ThisTable = html_CascadeUpTill(t,'TABLE');
/* comment out following if statement if you don't care about only showing one at a time */
if(html_GetElement('P1_MULTI_0').checked==false && g_LastRowOpened && g_LastRowOpened != l_TR){
ShowHideDetailRow(g_LastDetailLabel,l_ThisTable,g_LastRowOpened,i); //hides last row shown and resets label
}
ShowHideDetailRow(t,l_ThisTable,l_TR,i);
g_LastDetailLabel = t; // set the last show/hide_detail clicked
g_LastRowOpened = l_TR; // set the last row clicked
}

function ShowHideDetailRow(pThis,pTable,pTR,pID){
var l_NumCells = pTR.cells.length;
if(pTR.rowIndex == pTable.rows.length-1 || pTable.rows[pTR.rowIndex+1].className != "detail"){
var myNewRow = pTable.insertRow(pTR.rowIndex+1);
myNewRow.className = "detail";
var myNewCell = myNewRow.insertCell(0);
myNewCell.className = "t4data";
myNewCell.colSpan=l_NumCells;
myNewCell.appendChild(html_GetElement(pID));
html_ShowElement(pID);
}else{
html_ToggleElement(pTable.rows[pTR.rowIndex+1]);
}
SetDetailLabel(pThis);
}

function SetDetailLabel(pThis){
if(pThis.innerHTML == 'show_detail'){
pThis.innerHTML = 'hide_detail'
}else{
pThis.innerHTML = 'show_detail'
}
} 
function html_Submit_Progress(pThis){
		if(pThis.nodeName=='INPUT'){pThis.value='...Loading...'}
                else{pThis.innerHTML='...Loading...'};
		html_ShowElement('AjaxLoading');
window.setTimeout('html_GetElement("wait").src = html_GetElement("wait").src', 100);
		
		}
//-->

