﻿// JScript File
function customCall() {

}

function customcallchkbox(chkbox) {

}


function ind_opts(chkbox)
{
   document.getElementById("ctl00_cph_dirrec").checked = false;
   for(i=0; i<document.forms[0].elements.length; i++)
   {
        if (document.forms[0].elements[i].id.substring(0,19) == chkbox.id.substring(0,15) + '_ind'  )
        {   
            if (chkbox.id != document.forms[0].elements[i].id ) { 
                document.forms[0].elements[i].checked=false;
            }
        }
   }
   customCall();
	
}
function directors(chkbox)
{
    document.getElementById(chkbox.id.substring(0,15) + "_indf").checked = false;
    document.getElementById(chkbox.id.substring(0,15) + "_inda").checked = false;
    document.getElementById(chkbox.id.substring(0,15) + "_inde").checked = true;
    document.getElementById("ctl00_cph_dirrec").checked = false;
    customCall();
    customcallchkbox(chkbox);
    
}

function dir_opts(chkbox,isChecked)
{
   for(i=0; i<document.forms[0].elements.length; i++)
   {
        if (document.forms[0].elements[i].id.substring(0,19) == chkbox.id.substring(0,15) + '_dir'  )
        {       
            document.forms[0].elements[i].checked=isChecked;
        }
   }
   customCall();
	
}

function prop_opts(chkbox)
{
	document.getElementById("ctl00_cph_dirrec").checked = false;
   for(i=0; i<document.forms[0].elements.length; i++)
   {
        //Proposal checkbox has this name ctl00_cph_ctl01_propa, so we'll look at 20 characters
        if (document.forms[0].elements[i].id.substring(0,20) == chkbox.id.substring(0,20)  )
        {   
            if (chkbox.id != document.forms[0].elements[i].id ) { 
                document.forms[0].elements[i].checked=false;
            }
        }
   }	
   customCall();
}

function fordirs(chkbox)
{
    dir_opts(chkbox,false);
    ind_opts(chkbox);
    customCall();
}
function againstdirs(chkbox)
{
	dir_opts(chkbox,true);
	ind_opts(chkbox);
	customCall();
}
function exceptdirs(chkbox)
{
	dir_opts(chkbox,false);
	ind_opts(chkbox);
	customCall();
}

function annualmeeting()
{
	customCall();
}
function duplicatereport()
{
	customCall();
}


function OpenWin(file,winname)
{
	window.open(file,winname,'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=620,height=480');
}
function OpenWin2(file,winname)
{
	window.open(file,winname,'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width=640,height=560');
}
function OpenWin3(file,winname)
{
	window.open(file,winname,'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=680,height=480');
}
function OpenWin4(file,winname)
{
	window.open(file,winname,'toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1');
}
function OpenWin5(file,winname)
{
	window.open(file,winname,'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=500,height=370');
}
function calc_opts(optval)
{
	customCall();
}


function deliverymethod(chkbox) 
{
   if (chkbox.id == "ctl00_cph_yespaper" ){          
     document.getElementById("ctl00_cph_nopaper").checked=false;          
   }
   else  {      
     document.getElementById("ctl00_cph_yespaper").checked=false;   
       }    
}


