﻿<!-- 
//function to give an alert to nonusers
function notloggedalert()
{
alert('You are not logged in. Please Signin/Signup to go futher from this page.');
}
//-->

<!--
//To create a pop up window(addtraining.aspx)
var win=null;
function NewWindow(mypage,myname,w,h,scroll,pos){
if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
win=window.open(mypage,myname,settings);
//win=showModalDialog(mypage,myname,settings);
}
//-->

<!--
//To give a message to the nonuser(addtraining.aspx)
function msg()
{
alert('You must Login/Signup to upload a file.');
return false;
}
//-->

<!--
//To give a message to the user if the textbox in the cart is editted(t_cart.aspx) 
var count=true;
function Check(){
count=false;
}
//-->
<!--
function fncValidateChange(){
if(count==false)
{
alert('You have made changes to the cart. Please update cart before proceeding.');
return false;
}else 
return true;
}
//-->

<!--
// To disable the other fields not neededin the page(a_addassociation.aspx)
function disable(){
var radio = document.frmaddassos.elements['radNationalwide'];
if (radio[0].checked)
  {       
    document.frmaddassos.elements['txtRegionalname'].disabled= true;
    document.frmaddassos.elements['ddlProv'].disabled= true;
    document.frmaddassos.elements['radNationalwide'].item[0].selected=true;
  }
  else if (radio[1].checked)
  {
    document.frmaddassos.elements['txtRegionalname'].disabled= false;
    document.frmaddassos.elements['ddlProv'].disabled= false;
    document.frmaddassos.elements['radNationalwide'].item[1].selected=true;
  }
return false;
}
//-->

<!--
//To alert user about leaving the textbox/listbox vacant when needed(a_addassociation.aspx)
function Validate()
{
var rad = document.frmaddassos.elements['radNationalwide'];
if (rad[1].checked) {
 if((document.frmaddassos.elements["txtRegionalname"].value=="")&&(document.frmaddassos.elements["ddlProv"].value==0)){
   alert('You have selected Regional Chapter. Please enter Regional Chapter Name and select Province or Territory!!!');
   return false;}
   else if(document.frmaddassos.elements["txtRegionalname"].value==""){
   alert('You have selected Regional Chapter. Please enter Regional Chapter Name!!!');
   return false;}
   else if(document.frmaddassos.elements["ddlProv"].value==0){
   alert('You have selected Regional Chapter. Please select Province or Territory!!!');
   return false;}
   }
 else{
 return true;
 }
}
//-->

<!--
//To restrict the words entered in the descrip textbox(a_addassociation.aspx, t_addtrainingprofile.aspx)
function count_words(tbox_input,rem,max)
   {
   var msg = "";
   var c = 0;
   var er = 0;
   w = tbox_input.value.split(" ");
   no_words = w.length;
   for (x = 0; x < no_words; x++)
      {
      if (c > max-1)
         {
         document.getElementById(rem).value=0;
         alert("You can have a description of maximum "+ max +" words!!!");
         tbox_input.value = msg;
         er = 1;
         break;
         }
      msg = msg + w[x] + " ";
      c++;
      }
      if(c==max)
      document.getElementById(rem).value=max-c;
      else
      document.getElementById(rem).value=(max+1)-c;
   if (er)
      {
      return false;
      }
   return true;
   }
//-->

<!--Begin
//To set focus to the next form element as soon as current textbox filled(a_addassociation.aspx, client_signup.aspx, p_discuss.aspx, c_rfp.aspx )
var isNN = (navigator.appName.indexOf("Netscape")!=-1);
function autoTab(input,len, e) {
var keyCode = (isNN) ? e.which : e.keyCode;
var filter = (isNN) ? [0,8,9] : [0,8,9,16,17,18,37,38,39,40,46];
if(input.value.length >= len && !containsElement(filter,keyCode)) {
input.value = input.value.slice(0, len);
input.form[(getIndex(input)+1) % input.form.length].focus();
}
function containsElement(arr, ele) {
var found = false, index = 0;
while(!found && index < arr.length)
if(arr[index] == ele)
found = true;
else
index++;
return found;
}
function getIndex(input) {
var index = -1, i = 0, found = false;
while (i < input.form.length && index == -1)
if (input.form[i] == input)index = i;
else i++;
return index;
}
return true;
}
//  End -->


