  function OpenNewWindow(fileName, windowName, options) {
   var newWin = window.open(fileName, windowName, options);
  }

  /********************************************************************/
  // This is the goto page function used for translations
  /********************************************************************/
  function Goto_Page(gotopage) {
   document.location = "" + gotopage;  //NonSecure page
  }

  function Goto_PagePOP(pageName, sendVariable, winName, winScroll, winTools, winResize, winWidth, winHeight) {
   showWin('' + pageName + sendVariable, winName, 'scrollbars=' + winScroll + ',toolbar=' + winTools + ',resizable=' + winResize + ',width=' + winWidth + ',height=' + winHeight);
  }

  function Goto_SitePOP(siteName, winName, winResize, winWidth, winHeight) {
   showWin('http://' + siteName, winName, 'scrollbars=yes,resizable=' + winResize + ',toolbar=yes,width=' + winWidth + ',height=' + winHeight);
  }

  function setLanguageCookie(country) {
   if (country.length > 0) {
    document.cookie = 'Language=' + country + ';path=/;expires=Thu, 12-Feb-2099 12:00:00 GMT';
   }
  }

  function Goto_PagePS(gotopage) {
   if (gotopage == "trading.asp") {
    gotopage = "login.asp"
   }
   document.location = "" + gotopage;
  }

  function Goto_PagePOPps(pageName, sendVariable, winName, winScroll, winTools, winResize, winWidth, winHeight) {
   showWin('' + pageName + sendVariable, winName, 'scrollbars=' + winScroll + ',toolbar=' + winTools + ',resizable=' + winResize + ',width=' + winWidth + ',height=' + winHeight);
  }

<!--
//  This function is used for all pages to pass the
//  Session and connect ID's to all the pages.
function submitform(page) {         //JF
   document.submitform.action = page;
   document.submitform.submit();
}


function MM_openBrWindow(theURL, winName, features) { //v2.0
  window.open(theURL,winName,features);
}


var submitFlag = 0;   //Global variable used with confirmSubmit function
function confirmSubmit(theForm) {
   //Function uses submitFlag global var to confirm whether or not a form has been submitted

   //See if flag has been checked
   if (submitFlag == 0) {
      submitFlag = 1;   //Set flag to checked
      theForm.submit();  //Submit form
      return true;
   }
   else {
      //Respond with generic message
      alert('You have already submitted your request. \n Please wait for processing to complete.');
      return false;
   }
}

function ClearImg() {
// document.images["waitImg"].src ='';
   document.waitImg.src ='../ixx_images/loading2.gif';
   return true;
}


function CheckFieldsLogin() {
   if (document.form1.AccNum.value == "") {
      alert ('Please enter your account number.');
      document.form1.AccNum.focus();
      return false;
   }
   if (document.form1.ConnectID.value == "") {
      alert ('Please enter your PIN.');
      document.form1.ConnectID.focus();
      return false;
   }
   if (document.form1.password.value == "") {
      alert ('Please enter a Password.');
      document.form1.password.focus();
      return false;
   }
   return true;
}


var head = "display:''";
function doit(header) {
   var head = header.style;
   if (head.display == "none")
      head.display = "";
   else
      head.display = "none";
}


var loaded = 0;
var hasLayers = 0;
var lastMenu = '';
function MM_goToURL() {       //v3.0
   var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
   for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}


function ChangeLists(portfolio_name) {
   document.frmChangeLists.portfolio_name.value = portfolio_name;
   document.frmChangeLists.submit();
}


function MM_findObj(n, d) {      //v3.0
   var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
   d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
   if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
   for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}


function MM_swapImage() {     //v3.0
   var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}


function MM_swapImgRestore() {   //v3.0
   var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}


function MM_preloadImages() //v3.0
{
   var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
   var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
   if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}


// ****************************************************************************
// * This function is used for the dynamic drop down menu's   (JML)
// ****************************************************************************
NS4 = (document.layers) ? 1 : 0;
IE4 = (document.all) ? 1 : 0;
ver4 = (NS4 || IE4) ? 1 : 0;
topStart = 20;

if (ver4)
   hasLayers = 1;

function moveLayers() {
   if (hasLayers)    {
      if (NS4)       {
         padWidth = 0;
         document.layers['Layer1'].left = 402 + padWidth;
         document.layers['Layer1'].top = topStart;
         document.layers['Layer2'].left = 368 + padWidth;
         document.layers['Layer2'].top = topStart;
      }
      else     {
         padWidth = 0;
         document.all['Layer1'].style.pixelLeft = 402 + padWidth;
         document.all['Layer1'].style.pixelTop = topStart;
         document.all['Layer2'].style.pixelLeft = 368 + padWidth;
         document.all['Layer2'].style.pixelTop = topStart;
      }
   }
}


function popUp(menuName, on) {
   if (hasLayers)    {
      if (on) {
         moveLayers();
         if (NS4)
            document.layers[menuName].visibility = "show";
         else
            document.all[menuName].style.visibility = "visible";
      }
      else {
         if (NS4)
            document.layers[menuName].visibility = "hide";
         else
            document.all[menuName].style.visibility = "hidden";
      }
   }
}


var canHide = 1;
function change(menu) {
   if (hasLayers)    {
      popUp('Layer1',false);
      popUp('Layer2',false);
   }
   lastMenu = menu;
}


function delayHide() {
   if (canHide == 1)
      popUp(lastMenu,false);
}
// ****************************************************************************


// ****************************************************************************
// * This function is used for the "Symbol.asp" page for getting quotes  (JAL)
// ****************************************************************************
function SymbolLookupGetQuote(symbol, market) {
   return "Qreal.asp?scrip_code="+symbol+"&submit=Get Quote&Exchange="+market;
}
// ****************************************************************************


// ****************************************************************************
// * This function is used for the "Code.asp" page  (JML)
// ****************************************************************************
function populateFields(scripCode, marketID) {
   var equivOption = 0;
   for (count = 0; count < window.opener.document.frmGetQuote.exchange.length; count++) {
      if (window.opener.document.frmGetQuote.exchange.options[count].value == marketID) {
         equivOption = count;
         break;
      }
   }

   window.opener.document.frmGetQuote.scrip_code.value = scripCode;
   window.opener.document.frmGetQuote.exchange.options.selectedIndex = equivOption;
   window.close();
}
// ****************************************************************************


// ****************************************************************************
// * This is a Global function
// * Used for Popup Windows and onFocus calls  (JML)
// ****************************************************************************
var theWin = null;
function showWin(filename, name, features) {
   // Store new window object in global variable
   theWin = window.open(filename, name, features);
   theWin.focus();
}



// This one is used for the Transaction History, News and Charts on the Portfolio page
var theWin = null;
function showWinNew(URL, filename, name, features) {
   // Store new window object in global variable
   theWin = window.open(URL, filename, name, features);
   theWin.focus();
}
// ****************************************************************************


// ****************************************************************************
// * My Profile page - Change Password Section (MAprof.asp)  (Joe C)
// * Modified - Thu, 13-Mar-2003 15:00:00 GMT (JAL)
// ****************************************************************************
function checkFields1(frmID, curPw, newPw, newPwCnf) {

   var strRegExpI    = /[0-9]+[a-zA-Z]+/;
   var strRegExpII      = /[a-zA-Z]+[0-9]+/;
   var strRegExpIII  = /[^ a-zA-Z0-9]/;
   var strCurrPwd    = document.forms[frmID].elements[curPw].value;
   var strNewPwd     = document.forms[frmID].elements[newPw].value;
   var strNewPwdCnf  = document.forms[frmID].elements[newPwCnf].value;

   if (strCurrPwd == "") {
      alert ('Please enter your Current Password.');
      document.forms[frmID].elements[curPw].focus();
      return false;
   }
   if (strNewPwd == "") {
      alert ('Please enter a Password.');
      document.forms[frmID].elements[curPw].focus();
      return false;
   }
   else if (strCurrPwd == strNewPwd) {
      alert ('New Password and Current Password cannot match.');
      document.forms[frmID].elements[newPw].focus();
      return false;
   }
   else if ((strNewPwd.length < 8)||(strNewPwd.length > 12)){
      alert ('New Password must be between 8 and 12 characters in length.');
      document.forms[frmID].elements[newPw].focus();
      document.forms[frmID].elements[newPw].select();
      return false;
   }
   else if (strNewPwd != strNewPwdCnf ) {
      alert ('Entered passwords did not match.');
      document.forms[frmID].elements[newPw].focus();
      document.forms[frmID].elements[newPw].select();
      return false;
   }
   else if ((!strRegExpI.test(strNewPwd) && !strRegExpII.test(strNewPwd)) || strRegExpIII.test(strNewPwd) ){
      alert ('Please note that your password must be a combination of Letters and Numbers, but cannot contain any special characters..');
      //document.forms[frmID].elements[newPw].focus();
      document.forms[frmID].elements[newPw].select();
      return false;
   }
   return true;
}


// ****************************************************************************
// Account Preferences page - Update Details Section (MApref.asp)
// ****************************************************************************
function checkFields2() {
   if (document.validates.FName.value == "") {
      alert ('Please enter your First name.');
      document.validates.FName.focus();
      return false;
   }
   else if (document.validates.LName.value == "") {
      alert ('Please enter your Last name.');
      document.validates.LName.focus();
      return false;
   }
   else if (document.validates.Pincode.value == "") {
      alert ('Please enter your Pincode.');
      document.validates.Pincode.focus();
      return false;
   }
   else if (document.validates.Phone.value == "") {
      alert ('Please enter your Daytime Phone Number.');
      document.validates.Phone.focus();
      return false;
   }
    else if (document.validates.PhoneB.value == "") {
      alert ('Please enter your Evening Phone Number.');
      document.validates.PhoneB.focus();
      return false;
   }
   else if (document.validates.Email.value == "") {
      alert ('Please enter your e-mail address.');
      document.validates.Email.focus();
      return false;
   }
   return true;
}
// End checkFields2
// ****************************************************************************


// ****************************************************************************
// * Date field validation
// * (called by other validation functions that specify minYear/maxYear) (Joe C)
// ****************************************************************************
function isDate(minYear, maxYear, minDays, maxDays) {
   var inputStr = document.validation.Birth.value;
   // Convert hyphen delimiters to slashes
   while (inputStr.indexOf("-") != -1)
      inputStr = replaceString(inputStr,"-","/");

   var delim1 = inputStr.indexOf("/");
   var delim2 = inputStr.lastIndexOf("/");
   if (delim1 != -1 && delim1 == delim2)  {
      // There is only one delimiter in the string
      alert('The date entry is not in an acceptable format.\n\nYou can enter dates in the following formats: mmddyyyy, mm/dd/yyyy, or mm-dd-yyyy.  (If the month or date data is not available, enter \'01\' in the appropriate location).');
      return false;
   }
   if (delim1 != -1) {
      // There are delimiters; extract component values
      var dd = parseInt(inputStr.substring(0,delim1),10);
      var mm = parseInt(inputStr.substring(delim1 + 1,delim2),10);
      var yyyy = parseInt(inputStr.substring(delim2 + 1, inputStr.length),10);
   }
   else {
      // There are no delimiters; extract component values
      var dd = parseInt(inputStr.substring(0,2),10);
      var mm = parseInt(inputStr.substring(2,4),10);
      var yyyy = parseInt(inputStr.substring(4,inputStr.length),10);
   }

   if (isNaN(mm) || isNaN(dd) || isNaN(yyyy)) {
      // There is a non-numeric character in one of the component values
      alert('The date entry is not in an acceptable format.\n\nYou can enter dates in the following formats: mmddyyyy, mm/dd/yyyy, or mm-dd-yyyy.  (If the month or date data is not available, enter \'01\' in the appropriate location).');
      return false;
   }
   if (mm < 1 || mm > 12) {
      // Month value is not 1 thru 12
      alert('Months must be entered between the range of 01 (January) and 12 (December).');
      return false;
   }
   if (dd < 1 || dd > 31) {
      // Date value is not 1 thru 31
      alert('Days must be entered between the range of 01 and a maximum of 31 (depending on the month and year).');
      return false;
   }

   // Validate year, allowing for checks between year ranges
   // passed as parameters from other validation functions
   if (yyyy < 100) {
      // Entered value is two digits, which we allow for 1930-2029
      if (yyyy >= 30)
         yyyy += 1900;
      else
         yyyy += 2000;
   }

   var today = new Date();
   if (!minYear) {
      // Function called with specific day range parameters
      var dateStr = new String(monthDayFormat(mm) + "/" + monthDayFormat(dd) + "/" + yyyy);
      var testDate = new Date(dateStr);
      if (testDate.getTime() < (today.getTime() + (minDays * 24 * 60 * 60 * 1000)))
         alert('The most likely range for this entry begins ' + minDays + ' days from today.');
      if (testDate.getTime() > today.getTime() + (maxDays * 24 * 60 * 60 * 1000))
         alert('The most likely range for this entry ends ' + maxDays + ' days from today.');
   }
   else if (minYear && maxYear) {
      // Function called with specific year range parameters
      if (yyyy < minYear || yyyy > maxYear)
         alert('The most likely range for this entry is between the years ' + minYear + ' and ' + maxYear + '.  If your source data indicates a date outside this range, then enter that date.');
   }
   else {
      // Default year range (now set to (this year - 100) and (this year + 25)
      var thisYear = today.getYear();
      if (thisYear < 100)
         thisYear += 1900;
      if (yyyy < minYear || yyyy > maxYear)
         alert('It is unusual for a date entry to be before ' + minYear + ' or after ' + maxYear + '. Please verify this entry.');
   }
   return true;
}
// ****************************************************************************



// ****************************************************************************
// * This function is for the Trading pages - IE - NS
// * Order Status/History Console - Bring to front  (JL)
// ****************************************************************************
// *****************  This function is for the IE Version  ********************
// ****************************************************************************
var newWindowOrderStatus
var newWindowOrderHistory
var newWindowPOPhld
var newWindowPOPbal
var newwin
function makeNewWindowOrder(page) {
   var selection = document.form3.console;

   if (!newWindowOrderStatus || newWindowOrderStatus.closed || !newWindowOrderHistory || newWindowOrderHistory.closed || !newWindowPOPhld || newWindowPOPhld.closed || !newWindowPOPbal || newWindowPOPbal.closed) {
      newwin = window.open(page ,"Order","scrollbars=yes,resizable=yes,width=750,height=200");
      newwin.focus();
   }
// else if  (!newWindowOrderHistory || newWindowOrderHistory.closed) {
//    newwin = window.open(page ,"History","scrollbars=yes,resizable=no,width=750,height=200");
//     newwin.focus();
// }
}
// ****************************************************************************
// ***************  This function is for the Netscape Version  ****************
// ****************************************************************************
var newWindowOrderStatus
var newWindowOrderHistory
var newwin
function makeNewWindowOrderAdvanced(page) {
   var selection = document.form4.console;

   if (!newWindowOrderStatus || newWindowOrderStatus.closed) {
      newwin = window.open(page,"Order","scrollbars=yes,resizable=yes,width=750,height=200")
      newwin.focus();
   }
   else if (!newWindowOrderHistory || newWindowOrderHistory.closed) {
      newwin = window.open(page,"History","scrollbars=yes,resizable=yes,width=750,height=200")
      newwin.focus();
   }
}


// ****************************************************************************
// * This function is for the Trading page - Order Duration hide/show text*/
// ****************************************************************************
function tab(choice) {
  if (choice == 0) {
    document.all("span1").style.visibility = "visible";
    document.all("span2").style.visibility = "hidden";

    document.all("span3").style.visibility = "visible";
    document.all("span4").style.visibility = "hidden";
  }
  else {
    document.all("span1").style.visibility = "hidden";
    document.all("span2").style.visibility = "visible";

    document.all("span3").style.visibility = "hidden";
    document.all("span4").style.visibility = "visible";
  }
}
// ****************************************************************************


// ****************************************************************************
// * This is a Global function - Used for focus - on the script_code
// ****************************************************************************
function checkField2() {
   if (document.frmGetQuote.scripcode.value == "") {
      alert ('Please enter a Symbol.');
      document.frmGetQuote.scripcode.focus();
      return false;
   }
   if (document.frmGetQuote.Exchange.options[document.frmGetQuote.Exchange.selectedIndex].value == "") {
      alert ('Please select an exchange.');
      document.frmGetQuote.Exchange.focus();
      return false;
   }
}


function checkField3() {
   if (document.frmGetQuote.Exchange.options[document.frmGetQuote.Exchange.selectedIndex].value == "") {
      alert ('Please select an exchange.');
      document.frmGetQuote.Exchange.focus();
      return false;
   }
   if (document.frmGetQuote.scrip_code.value == "") {
      alert ('Please enter a Symbol.');
      document.frmGetQuote.scrip_code.focus();
      return false;
   }
}


function CheckFieldSymLk() {
   if (document.frmGetQuote.scripcode.value == "") {
      alert ('Please enter a company name.');
      document.frmGetQuote.scripcode.focus();
      return false;
   }
   if (document.frmGetQuote.market.options[document.frmGetQuote.market.selectedIndex].value == "") {
      alert ('Please select an exchange.');
      document.frmGetQuote.market.focus();
      return false;
   }
}
// ****************************************************************************


// ****************************************************************************
// * Global function - Used for displaying a message in the status bar - MD
// ****************************************************************************
function dm(msgStr) {
    window.status = msgStr;
    return true;
}
// ****************************************************************************


// ****************************************************************************
// * Global function - Used for focus - Trading Page (JL)
// ****************************************************************************
function check() {
  checkLimit();
  checkDayOnly();
}
// ****************************************************************************


// ****************************************************************************
// * Global function - Used for changing the wait image to blank
// ****************************************************************************
function changeImage(path) {
   document.images["wait"].src = path+'ixx_images/processing2.gif';
   return true;
}


// ****************************************************************************
// * Global function - Used for changing the wait image to blank on POP UP WINDOWS
// ****************************************************************************
function changeImagePop(path) {
   //document.images["wait"].src = path+'ixx_images/processing-pop2.gif';
   document.images["wait"].src = path+'ixx_images/processing-pop2.gif';
   return true;
}


// ****************************************************************************
// * Application Pack Form - C-OAopen.asp - JML 03-08-01
// ****************************************************************************
function OpenAccValidation() {
// var LNameEx = /(^[a-zA-Z]+((\ |\-)?[a-zA-Z]+)?(\'[a-zA-Z]+)?((\ |\-)?[a-zA-Z]+((\ |\-)?[a-zA-Z]+)?(\'[a-zA-Z]+)?((\,)?\ [a-zA-Z]+(\.)?)?)?(\ )*$)/;
// var FNameEx = /(^([a-zA-Z]{1}(\.?\ ?))?([a-zA-Z]+((\ |\-)?[a-zA-Z]+)?(\'[a-zA-Z]+)?((\ |\-)?[a-zA-Z]+)?(\'[a-zA-Z]+)?(\ )*)?$)/;

   if (document.openacc.LN.value == "")   {
      alert ('Please enter your Last name.');
      document.openacc.LN.focus();
      return false;
   }
// if (!LNameEx.test(document.openacc.LN.value)) {
//    alert ('There is at least one invalid character in your Last name.\n\nValid characters are letters (A-Z, a-z), hyphens (-),\napostrophes (\'), periods (.), and spaces..');
//    document.openacc.LN.focus();
//    return false;
// }
   if (document.openacc.FN.value == "") {
      alert ('Please enter your First name.');
      document.openacc.FN.focus();
      return false;
   }
// if (!FNameEx.test(document.openacc.FN.value)) {
//    alert ('There is at least one invalid character in your First name.\n\nValid characters are letters (A-Z, a-z), hyphens (-),\napostrophes (\'), periods (.), and spaces..');
//    document.openacc.FN.focus();
//    return false;
// }
   if (document.openacc.Address.value == "") {
      alert ('Please enter your Residential Address.');
      document.openacc.Address.focus();
      return false;
   }
   if (document.openacc.City.value == "") {
      alert ('Please enter your City/Suburb.');
      document.openacc.City.focus();
      return false;
   }
   if (document.openacc.Pincode.value == "") {
      alert ('Please enter your Postal-code');
      document.openacc.Pincode.focus();
      return false;
   }
// if (document.openacc.HearAbout.value == "Choose") {
//    alert ('Please tell us how you heard about Internaxx');
//    document.openacc.HearAbout.focus();
//    return false;
// }
// if (document.openacc.PhoneM.value != "") {
//    if (!validPhoneNum(document.openacc.PhoneM.value))
//    {
//       alert ('The mobile number entered is invalid.\n\nPhone numbers MUST have at least 10 digits and can only contain valid characters.\nValid characters are hyphens, spaces, and the digits 0 through 9.');
//       document.openacc.PhoneM.focus();
//       return false;
//    }
// }
   if (document.openacc.Email.value == "") {
      alert('Please enter a valid Email address');
      document.openacc.Email.focus();
      return false;
   }
   else if (validEmail(document.openacc.Email.value) == false) {
      alert('Please enter a valid Email address');
      document.openacc.Email.focus();
      return false;
   }

// if (document.openacc.Email.value == "") {
//    if (validEmail(document.openacc.Email.value) == false)
//    {
//       alert ('Please enter a valid Email address');
//       document.openacc.Email.focus();
//       return false;
//    }
// }
   return true;
}
// ****************************************************************************


// ****************************************************************************
// * Validation of email addresses (BAL)
// *
// * Called in :
// * OpenAccValidation - C-OAopen.asp
// ****************************************************************************
function validEmail(email) {
   var exclude=/[^@\-\.\w]|^[_@\.\-]|[\._\-]{2}|[@\.]{2}|(@)[^@]*\1/; var check=/@[\w\-]+\./;
   var checkend=/\.[a-zA-Z]{2,4}$/;

   // Are there any invalid characters in the address?
   if((email.search(exclude) != -1) || (email.search(checkend) == -1))
      return false;

   atPos = email.indexOf("@",0);
   pPos1 = email.indexOf(".",0);
   periodPos = email.indexOf(".",atPos);

   // Are there consecutive periods?
   pos1 = pPos1;
   pos2 = 0;
   while (pos2 > -1) {
      pos2 = email.indexOf(".",pos1+1);
      if (pos2 == pos1+1)
         return false;
      else
         pos1 = pos2;
   }

   // Is there an @ symbol in the address?
   if (atPos == -1)
      return false;

   // Is the @ symbol in the first position?
   if (atPos == 0)
      return false;

   // Is there a period in the first position?
   if (pPos1 == 0)
      return false;

   // Is there more than one @ symbol in the address?
   if(email.indexOf("@",atPos+1) > -1)
      return false;

   // Is there a period after the @ symbol?
   if (periodPos == -1)
      return false;

   // Is the period imediately after the @ symbol?
   if (atPos+1 == periodPos)
      return false;

   // Are there at least 2 characters after the period?
   if (periodPos+3 > email.length)
      return false;

   return true;
}
// END validEmail *************************************************************
// ****************************************************************************

// ****************************************************************************
// * Validates the correct syntax of a phone number. (BAL/CM)
// *
// * OpenAccValidation - C-OAopen.asp
// ****************************************************************************
function validPhoneNum(phoneNum) {
   var validChars = /[\-\ ]*/g;
   var phoneNumEx = /(^\d{10}\d*$)/;

   phoneNum = phoneNum.replace(validChars, ""); // strip valid characters (spaces and hyphens) out of the phone number

   if (!phoneNumEx.test(phoneNum)) {
      return false;
   }
   return true;
}
// END validPhoneNum **********************************************************
// ****************************************************************************


// ****************************************************************************
// * setLanguageCookie (JCF) 3/14/2001
// * Sets the default language in the cookie to the country
// * specified in the input parameter
// *
// * Called in :
// * C-HWelcm.asp, index.asp, maprof.asp
// ****************************************************************************
function setLanguageCookie(country) {
   if (country.length > 0) {
      document.cookie = 'Language=' + country + ';path=/;expires=Thu, 12-Feb-2099 12:00:00 GMT';
   }
}
// END setLanguageCookie ******************************************************
// ****************************************************************************
//-->


// * Others

// ***************************************************************************
// * Demo Pages - gotoFile
function gotoFile(filename) {
	window.opener.top.location = filename;
	window.close()
}

	
// * Print page script for Exchange Agreements Popup
function printPage() {
	if (window.print) {
		agree = confirm('Please make sure your printer is on and connected properly. \n\nOK to print now?');
		if (agree) window.print();
	}
}

// * Validation Script used by Exchange agreement Popup
function validateRadio()  {
	if (!document.validation.From_Terms0[0].checked && !document.validation.From_Terms0[1].checked) {
		alert('You must choose to either agree or disagree.');
		document.validation.From_Terms0[0].focus();
		return(false);
	}
	if (!document.validation.From_Terms1[0].checked && !document.validation.From_Terms1[1].checked) {
		alert('You must choose to either agree or disagree.');
		document.validation.From_Terms1[0].focus();
		return(false);
	}
	if (!document.validation.From_Terms2[0].checked && !document.validation.From_Terms2[1].checked) {
		alert('You must choose to either agree or disagree.');
		document.validation.From_Terms2[0].focus();
		return(false);
	}
	if (!document.validation.From_Terms3[0].checked && !document.validation.From_Terms3[1].checked) {
		alert('You must choose to either agree or disagree.');
		document.validation.From_Terms3[0].focus();
		return(false);
	}
	if (!document.validation.From_Terms4[0].checked && !document.validation.From_Terms4[1].checked) {
		alert('You must choose to either agree or disagree.');
		document.validation.From_Terms4[0].focus();
		return(false);
	}
	if (!document.validation.From_Terms5[0].checked && !document.validation.From_Terms5[1].checked) {
		alert('You must choose to either agree or disagree.');
		document.validation.From_Terms5[0].focus();
		return(false);
	}
	if (!document.validation.From_Terms6[0].checked && !document.validation.From_Terms6[1].checked) {
		alert('You must choose to either agree or disagree.');
		document.validation.From_Terms6[0].focus();
		return(false);
	}
	if (!document.validation.From_Terms7[0].checked && !document.validation.From_Terms7[1].checked) {
		alert('You must choose to either agree or disagree.');
		document.validation.From_Terms7[0].focus();
		return(false);
	}
	if (!document.validation.From_Terms8[0].checked && !document.validation.From_Terms8[1].checked) {
		alert('You must choose to either agree or disagree.');
		document.validation.From_Terms8[0].focus();
		return(false);
	}
	if (!document.validation.From_Terms9[0].checked && !document.validation.From_Terms9[1].checked) {
		alert('You must choose to either agree or disagree.');
		document.validation.From_Terms9[0].focus();
		return(false);
	}
	if (!document.validation.From_Terms10[0].checked && !document.validation.From_Terms10[1].checked) {
		alert('You must choose to either agree or disagree.');
		document.validation.From_Terms10[0].focus();
		return(false);
	}
	if (!document.validation.From_Terms11[0].checked && !document.validation.From_Terms11[1].checked) {
		alert('You must choose to either agree or disagree.');
		document.validation.From_Terms11[0].focus();
		return(false);
	}

	return true;
}


// * This function is used in the FAQ's page to hide/show divs
function showAndHide(theId)
{
   var el = document.getElementById(theId)

   if (el.style.display=="none")
   {
      el.style.display="block"; //show element
   }
   else
   {
      el.style.display="none"; //hide element
   }
}
function getFundType(){
	var selected = document.getElementById('select').options[document.getElementById('select').selectedIndex].value;
	document.findFund.action="/staticcontent/fundSearch.html?navform_menuid=investment_mutualfunds_fundslist&noresults=500&Filter1="+selected;
	document.findFund.submit();
}

function getFundByName(){
	var search=document.getElementById('fundName').value;
	if(search.length != 0){
		document.findFund.action="/staticcontent/fundSearch.html?navform_menuid=investment_mutualfunds_fundslist&search="+search+"&noresults=500";
		document.findFund.submit();
	}
}

