//Portions are Copyright (c) 2000-2005, Mobular Technologies&#174;, Inc.  All Rights Reserved.
//Mobular and Mobular Technologies are Registered Trademarks of Mobular
//Technologies, Inc.
//All rights reserved.  Unauthorized reproduction prohibited.
//http://www.mobular.com/
//

// adjust for missing search nvp
var _loc = new String(""+this.parent.location);
var _query = new String(''+this.parent.location.search);
if ( _query == '?' ) {
	_query = '';
}

// reset location
if ( (_query == '') && (_loc.indexOf("?") != -1) ) {
	_loc = _loc.replace('?','');
	this.parent.location = _loc;
} 
 
var backup_gShowShow = '';
function initializeCover()
{
  document.getElementById("showFrame").style.visibility = "HIDDEN";
  
  if ( ( g_ekitCover != "" ) && ( g_cover == 3 ) ) 
  {
    // Modify g_showShow so that when the user goes back to the kit cover they
    // do not see the single page.

    var new_cover = "";  
    new_cover += "\n<table width=\"814\" height=\"500\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">";
    new_cover += "\n  <tr valign=\"middle\">";
    new_cover += "\n    <td align=\"center\" valign=\"middle\">";
    new_cover += "\n          <h2>";
    new_cover += g_engineTitle;
    new_cover += "\n          </h2>";
    new_cover += "\n          <br />";
    new_cover += "\n          is loading.  Please be patient.";
    new_cover += "\n          <br />";
    new_cover += "\n          <br />";
    new_cover += "\n          <br />";
    new_cover += "\n          <img src=\"images/loading.gif\" alt=\"\" />";
    new_cover += "\n    </td>";
    new_cover += "\n  </tr>";
    new_cover += "\n  <tr>";
    new_cover += "\n    <td><img src=\"images/c.gif\" alt=\"\" width=\"1\" height=\"10\" border=\"0\" /></td>";
    new_cover += "\n  </tr>";
    new_cover += "\n</table>";
	
   document.getElementById("loadingFrame").style.visibility = "HIDDEN";   
   document.getElementById("loadingFrame").innerHTML = new_cover;	   
   document.getElementById("loadingFrame").style.visibility = "VISIBLE";   
  }

  backup_gShowShow = g_showShow;
  
}

function recreateShowShow() {
	try {
	eengine.kitData.remote = eengine.remote;
	} catch (e) {}

	// reload cover	
	// hide loading screen.. and display cover screen
	document.getElementById("loadingFrame").innerHTML = '';
	document.getElementById("loadingFrame").style.visibility = "HIDDEN";
}

//-----------------------------------------------------------------------------
// validate checks to see if the form values passed in from the s2f forward are valid.
//-----------------------------------------------------------------------------

function I2U_validate2(fo) {

	// in case the form reference is lost... look again for it.
	if (! fo ) {
		if ( document.data ) {
			fo = document.data;
		} else {
	        if ( eval( this.sFS ) ) {
	           fo = eval(this.sFS+".document.data");
	        }			
		}
	}		
		
    if ( eval( this.sFS ) ) {
		fo = eval(this.sFS+".document.data");
    }
	
	// Cleanse the subject and comments fields of any HTML tags
    if ( fo.subject.value == "" ) {
		return this.shwEr(this.erMsg[11], -1);
	} else {
		fo.subject.value = fo.subject.value.replace( /<[^<|>]+?>/gi, '' );		
	}
	
    if ( fo.Comments.value != "" ) {
		fo.Comments.value = fo.Comments.value.replace( /<[^<|>]+?>/gi, '' );				
	}

	// Let the standard engine code finish the process
	return eengine.validate(fo);
	
}




// Default links -- These must be overridden by submitting the links.js
// file at build time.

//----------------------- Segment 8 - Voting ----------------------------------
voting_link_text 			= "CAST YOUR VOTE";
voting_link 				= "";
voting_ends					= "";

// Note: The voting_ends variable must be defined in the following format:
//		 "yyyy-mm-dd".
//-----------------------------------------------------------------------------

//----------------------- Segment 9 - Shareholding management -----------------
shareholding_link_text		= "View and update your shareholding";
shareholding_link 			= "https://www-au.computershare.com/Investor/LoginHolder.asp?issuerid=scaucpu";
//-----------------------------------------------------------------------------

//----------------------- Segment 11 - Useful links ---------------------------
useful1_link_text			= "Company website";
useful1_link 				= "http://www.computershare.com";

useful2_link_text			= "Share price";
useful2_link 				= "http://www.asx.com.au/asx/markets/PriceResults.jsp?method=get&template=F1001&ASXCodes=cpu";

useful3_link_text 			= "Announcements";
useful3_link 				= "http://www.asx.com.au/asx/statistics/announcementSearch.do?method=searchByCode&issuerCode=cpu&timeFrameSearchType=D&releasedDuringCode=M";

useful4_link_text 			= "ASX website";
useful4_link 				= "http://www.asx.com.au";

useful5_link_text 			= "";
useful5_link 				= "";

useful6_link_text 			= "";
useful6_link 				= "";

useful7_link_text 			= "";
useful7_link 				= "";

useful8_link_text 			= "";
useful8_link				= "";

// Note: For the financials_link variable, enter only the name of the Excel  
//       file being uploaded.  If no financials spreadsheet is being deployed
//       with the AMK, leave the financials_link value blank.
financials_link_text		= "Download financials";
financials_link				= "";  
//-----------------------------------------------------------------------------

//----------------------- Miscellaneous ---------------------------------------
usefulLinksString			= "Useful links";
clickString 				= "Click here";
//----------------------- Miscellaneous ---------------------------------------
