//Function added - 01/09/2008
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
/********************************************************************************************************************************/
/* innerXHTML.js */
/*===================================================================*\
innerXHTML
Copyright (c) 2006 space150, LLC and released under the CPL license:
http://opensource.org/licenses/cpl1.0.php
\*===================================================================*/
function innerXHTML(obj, encode, child) {
// It is an option to pass innerXHTML() a string indicating an id attribute
if (typeof obj == "string") {
obj = document.getElementById(obj)
}
var open = '';
var content = '';
var close = '';
var tagname = obj.nodeName.toLowerCase();
//alert('tagname:' + tagname);
var emptytag = (obj.nodeName.match(/area|base|basefont|br|col|frame|hr|img|input|isindex|link|meta|param/i)) ? true : false;
// Write open tag
if (child == true){
open = '<'+tagname;
for (var i=0; i' : '>';
}
if (!emptytag) {
// Write tag content
for (var i=0; i';
}
}
// URI encode the content if desired
return (typeof(encode)=="undefined" || encode==true) ? encodeURIComponent(open+content+close) : open+content+close;
}
/********************************************************************************************************************************/
/********************************************************************************************************************************/
/* ORIGINAL common.js */
// Function used to share articles on facebook
function fbs_click() {
u=location.href;
t=document.title;
window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');
return false;
}
//image_rooover.js
function MM_swapImgRestore() {
var i,x,a=document.MM_sr; for(i=0;a&&i0&&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=currentProductCount)
return true;
$(".product_belt_inner").animate({"left": "-=104px"}, "slow");
currentIndex +=1;
}
jQuery.fn.extend({
//---------------------------------------------------------------
highlight : function(speed, callback) {
return $(this).fadeTo(speed, 0.01, function(){$(this).fadeTo(speed, 1.0, callback)});
}
});
$(document).ready(function(){
$("#asset200_addToCompare a").click(function (){
addProduct();
});
$("#asset200_removeFromCompare a").click(removeProduct);
checkProduct();
});
function addProduct(){
var bar = $(".product_belt_inner").html().replace(/(<\/?)script/g,"$1noscript").replace(/(<\/?)iframe/g,"$1noiframe");
//var product = $("#Product_for_Basket").html();
var product = innerXHTML('Product_for_Basket',false).replace(/(<\/?)script/g,"$1noscript").replace(/(<\/?)iframe/g,"$1noiframe")
//product = product.replace('//','/');
//alert(product);
var fullBar = product + bar ;
$(".product_belt_inner").html(fullBar);
$(".product_belt_inner .product_box:first").highlight("slow");
currentProductCount = $(".product_belt_inner .product_box").length;
setupBelt();
$("#asset200_addToCompare").fadeOut("slow",
function(){
$("#asset200_removeFromCompare").fadeIn("slow");
}
);
var productName = $.trim($("#Product_for_Basket .product_name").html());
var productDescription = $("#product_comparison").html();
//alert(productDescription);
$.post("comparisons.ashx", {action: "add", ProductName: productName , BriefDescription:product, ProductHtml: productDescription} );
//$(".product_belt").highlight("slow");
// start modification by Panalysis
try
{
urchinTracker('/my comparisons/add/' + productName);
} catch (e) {}
// end modification
}
function checkProduct(){
try{
var product = $("#Product_for_Basket").html();
var productName = $.trim($("#Product_for_Basket .product_name").html());
var productDescription = $("#product_comparison").html();
$.post("comparisons.ashx", {action: "verify", ProductName: productName , BriefDescription:product, ProductHtml: productDescription}, function(data){
if(data=="true"){
$("#asset200_addToCompare").hide();
$("#asset200_removeFromCompare").show();
}
} );
}
catch(err){
}
}
function removeProduct(){
$(".product_belt_inner .product_box:first").fadeOut("slow").remove();
$("#asset200_removeFromCompare").fadeOut("slow",
function(){
$("#asset200_addToCompare").fadeIn("slow");
}
);
var productName = $.trim($("#Product_for_Basket .product_name").html());
$.post("comparisons.ashx", {action: "remove", ProductName: productName } );
// start modification by Panalysis
try
{
urchinTracker('/my comparisons/remove/' + productName);
} catch (e) {}
// end modification by Panalysis
}
/********************************************************************************************************************************/
/* search.js */
function clearDefaultText(elem)
{
if (elem.value == 'Search '+sFn) {
elem.value='';
$(elem).removeClass("default");
}
else if (elem.value == 'Search all articles') {
elem.value='';
}
else if (elem.value == 'Search all media') {
elem.value='';
}
}
/********************************************************************************************************************************/
/********************************************************************************************************************************/
/* pngfix.js */
function pngFix(){
var arVersion = navigator.appVersion.split("MSIE")
var version = parseFloat(arVersion[1])
if ((version >= 5.5) && (document.body.filters) && (version < 7) )
{
for(var i=0; i"
img.outerHTML = strNewHTML
i = i-1
}
}
}
}
var oNotPngFix = window.onload;
if (typeof window.onload != 'function') {
window.onload = pngFix;
}else{
window.onload = function(){
if (oNotPngFix){oNotPngFix();}
pngFix();
}
}
/********************************************************************************************************************************/
/********************************************************************************************************************************/
/* textresize.js */
$(document).ready(function(){
// Reset Font Size
var hasBodyIncreased=false;
var hasAssetIncreased=false;
var originalFontSizeBody = $('#bd').css('font-size');
var originalFontSizeFooter = $('#ft').css('font-size');
var originalFontSizeAsset = '';
// Increase Font Size
$(".increaseFont").click(function(){
if ($(this).parent().attr("id") == 'common12') {
if (!hasBodyIncreased){
var currentFontSize = $('#bd').css('font-size');
var currentFontSizeNum = parseFloat(currentFontSize, 10);
var newFontSize = currentFontSizeNum*1.125;
$('#bd').css('font-size', newFontSize);
currentFontSize = $('#ft').css('font-size');
currentFontSizeNum = parseFloat(currentFontSize, 10);
newFontSize = currentFontSizeNum*1.125;
$('#ft').css('font-size', newFontSize);
hasBodyIncreased = true;
}
} else {
if (!hasAssetIncreased){
var currentFontSize = $(this).parent().siblings(".content_wrapper").css('font-size');
var currentFontSizeNum = parseFloat(currentFontSize, 10);
originalFontSizeAsset = currentFontSizeNum;
var newFontSize = currentFontSizeNum*1.125;
$(this).parent().siblings(".content_wrapper").css('font-size', newFontSize);
hasAssetIncreased = true;
}
}
});
// Decrease Font Size
$(".decreaseFont").click(function(){
if (originalFontSizeAsset != '') {
$(this).parent().siblings(".content_wrapper").css('font-size', originalFontSizeAsset);
originalFontSizeAsset = '';
hasAssetIncreased = false;
} else {
$('#bd').css('font-size', originalFontSizeBody);
$('#ft').css('font-size', originalFontSizeFooter);
hasBodyIncreased = false;
}
});
});
/********************************************************************************************************************************/
/********************************************************************************************************************************/
/* asset47.js */
var CurrentPositionNo=1;
var myArray = new Array();
var totalContentBlocks=0;
function displayText(position){
document.write(myArray[CurrentPositionNo]);
}
function clearImages(){
var el = document.getElementById('imagedisplay');
el.innerHTML = '';
for(i=1;i<=totalContentBlocks;i++){
if(i==CurrentPositionNo){
var imageSelected = ""
el.innerHTML = el.innerHTML+imageSelected;
}
else{
var imageNotSelected = ""
el.innerHTML = el.innerHTML+imageNotSelected;
}
}
}
function TextNumber(position){
if(position == 'previous'){
MinusPosition();
}
if(position == 'next'){
AddPosition();
}
}
function AddtoArray(){
totalContentBlocks++;
}
function currentPosition(){
CurrentPositionNo = CurrentPositionNo + 1;
}
function MinusPosition(){
if(CurrentPositionNo > 1){
document.getElementById('text'+CurrentPositionNo).style.display = "none";
document.getElementById('text'+(CurrentPositionNo-1)).style.display = "block";
CurrentPositionNo--;
clearImages();
}
}
function AddPosition(){
if(CurrentPositionNo < totalContentBlocks){
document.getElementById('text'+CurrentPositionNo).style.display = "none";
document.getElementById('text'+(CurrentPositionNo+1)).style.display = "block";
CurrentPositionNo++;
clearImages();
}
}
/********************************************************************************************************************************/
/********************************************************************************************************************************/
/* email.js */
function addURLToBody(elem)
{
if (elem.href.lastIndexOf('&body') < 1) {
elem.href = elem.href + '&body=' + window.location;
}
return true;
}
/********************************************************************************************************************************/
/********************************************************************************************************************************/
/* asset27.js */
function asset27_changeTab(nameoftab)
{
if(nameoftab=='top'){
document.getElementById('top').style.display = "block";
document.getElementById('asset27_tab_4').className="tab_on";
document.getElementById('recent').style.display = "none";
document.getElementById('asset27_tab_2').className="tab_off_last";
document.getElementById('recent_right').className="tab_right_recent";
}
if(nameoftab=='recent'){
document.getElementById('top').style.display = "none";
document.getElementById('asset27_tab_4').className="tab_off_last";
document.getElementById('recent').style.display = "block";
document.getElementById('asset27_tab_2').className="tab_on";
document.getElementById('recent_right').className="tab_right";
}
}
/********************************************************************************************************************************/
/********************************************************************************************************************************/
/* common-6.js */
function highlight (elem, isOver, isSelected, classPrefix, title)
{
if(title == "Personal") {
if(isOver) {
$("#common6 .personal").attr("src", "site_images/inc/images/personal_hover.gif");
}
else {
$("#common6 .personal").attr("src", "site_images/inc/images/personal.gif");
}
}
if(title == "Rural") {
if(isOver) {
$("#common6 .rural").attr("src", "site_images/inc/images/rural_hover.gif");
}
else {
$("#common6 .rural").attr("src", "site_images/inc/images/rural.gif");
}
}
if (isSelected!=true) {
var listStyle = 'text offmenu';
var anchorStyle = 'text offmenu';
if (isOver==true) {
listStyle = listStyle + ((classPrefix!='') ? ' ' + classPrefix : '') + '_over';
anchorStyle = anchorStyle + ((classPrefix!='') ? ' ' + classPrefix : '') + '_over';
} else {
listStyle = listStyle + ' ' + classPrefix;
anchorStyle = anchorStyle + ' ' + classPrefix;
}
elem.className = listStyle;
if (elem.childNodes.length > 0) {
if (elem.childNodes[0].tagName == 'A') {
elem.childNodes[0].className = anchorStyle;
}
}
}
return false;
}
/********************************************************************************************************************************/
/********************************************************************************************************************************/
/* asset39.js */
$(document).ready(function(){
$('.glossary_block').hide();
showGlossaryPanel("A");
$('.alphabet .letter a').click(function(){
showGlossaryPanel($(this).html());
});
});
function showGlossaryPanel(letter) {
var glossaryBlocks = $('.glossary_block');
glossaryBlocks.hide();
$('.glossary_block .header').each(function(i){
if($(this).html() == letter) {
var MAX_HEIGHT = 930;
var totalHeight = 0;
totalHeight += $(glossaryBlocks.get(i)).height();
$(glossaryBlocks.get(i)).show();
var nextIndex = i+1;
while((totalHeight + $(glossaryBlocks.get(nextIndex)).height() <= MAX_HEIGHT) && (nextIndex < glossaryBlocks.length)){
//alert(totalHeight);
$(glossaryBlocks.get(nextIndex)).show();
totalHeight += $(glossaryBlocks.get(nextIndex)).height();
nextIndex++;
}
//alert(totalHeight);
}
});
}
/********************************************************************************************************************************/
/********************************************************************************************************************************/
/* asset15.js */
var asset15_counter = 0;
$(document).ready(function(){
$('#asset15 .article').each(function(i) {
if(i > 0) {
$(this).show();
}
});
var maxHeight = 0;
$('#asset15 .article .main_block').each(function(i) {
if($(this).height() > maxHeight) {
maxHeight = $(this).height();
}
});
$('#asset15 .article .main_block').each(function(i) {
$(this).height(maxHeight);
});
$('#asset15 .article').each(function(i) {
if(i > 0) {
$(this).hide();
}
});
$('#asset15 .pagination .previous').click(function(){
previousPage();
});
$('#asset15 .pagination .next').click(function(){
nextPage();
});
});
function previousPage() {
var pages = $('#asset15 .pagination .page');
var articles = $('#asset15 .article');
pages.each(function(i) {
if($(this).hasClass("selected") && i-1 >= 0) {
$(this).removeClass("selected");
$(pages.get(i-1)).addClass("selected");
$(articles.get(i)).hide();
$(articles.get(i-1)).show();
return false;
}
});
}
function nextPage() {
var pages = $('#asset15 .pagination .page');
var articles = $('#asset15 .article');
pages.each(function(i) {
if($(this).hasClass("selected") && i+1 < pages.length) {
$(this).removeClass("selected");
$(pages.get(i+1)).addClass("selected");
$(articles.get(i)).hide();
$(articles.get(i+1)).show();
return false;
}
});
}
/********************************************************************************************************************************/
/********************************************************************************************************************************/
/* asset12.js */
var asset12_timerID = null;
var asset12_hideTime = 1500;
function asset12_toggleSelectionList(dropDown)
{
var dropDownList = document.getElementById(dropDown);
//show or hide the dropdown box
if (dropDownList.style.visibility == 'visible') {
dropDownList.style.visibility = 'hidden';
dropDownList.style.display = 'none';
} else {
dropDownList.style.visibility = 'visible';
dropDownList.style.display = 'block';
}
asset12_toggleTimer(dropDown);
}
function asset12_toggleTimer(dropDown)
{
var dropDownList = document.getElementById(dropDown);
if ((asset12_timerID == null) && (dropDownList.style.display == 'block')) {
//set the roll up timer for the dropdown box since it's visible
asset12_timerID = setTimeout('asset12_toggleSelectionList("' + dropDown + '")', asset12_hideTime);
}
else {
//kill roll up timer
clearTimeout(asset12_timerID);
asset12_timerID = null;
}
}
function asset12_selectOption(elem, selector, hideElem, changeElem)
{
//capture the selected link
var selOption = document.getElementById(changeElem);
selOption.value = elem.innerHTML;
//change the selected text
var dropSelected = document.getElementById(selector);
dropSelected.childNodes[0].nodeValue = elem.innerHTML;
//hide the dropdown box
var dropDownList = document.getElementById(hideElem);
dropDownList.style.visibility = 'hidden';
dropDownList.style.display = 'none';
asset12_toggleTimer(hideElem);
}
function asset12_changeTarget(selectedElem, dropDown)
{
var selValue = document.getElementById(selectedElem).value;
//use the selected value or the first link will be selected by default
selValue = ((selValue!='') && (selValue!=null))? selValue: document.getElementById(dropDown).getElementsByTagName('A')[0];
window.location.href = selValue;
}
/********************************************************************************************************************************/
/********************************************************************************************************************************/
/* asset11.js */
$(document).ready(function(){
/*
$('#asset11 .results_page').each(function(i) {
if(i > 0) {
$(this).show();
}
});
var maxHeight = 0;
$('#asset11 .results_page').each(function(i) {
if($(this).height() > maxHeight) {
maxHeight = $(this).height();
}
});
$('#asset11 .results_page').each(function(i) {
$(this).height(maxHeight);
});
$('#asset11 .results_page').each(function(i) {
if(i > 0) {
$(this).hide();
}
});
*/
$('#asset11 .pagination .paginationpage a').click(function(){
asset11_displayResultsPage(parseInt($(this).html())-1);
});
$('#asset11 .pagination .previous a').click(function(){
asset11_previousPage();
});
$('#asset11 .pagination .next a').click(function(){
asset11_nextPage();
});
asset11_setTheInitialIndexes();
});
function asset11_setTheInitialIndexes(){
var pagesTop = $('#asset11 .top .pagination .paginationpage');
var pagesBottom = $('#asset11 .bottom .pagination .paginationpage');
$(pagesTop.get(0)).addClass("current");
$(pagesBottom.get(0)).addClass("current");
//alert($('#asset11 .bottom .pagination .paginationpage').text());
}
function asset11_previousPage() {
var pagesTop = $('#asset11 .top .pagination .paginationpage');
var pagesBottom = $('#asset11 .bottom .pagination .paginationpage');
var resultsPages = $('#asset11 .results_page');
pagesTop.each(function(i) {
if($(this).hasClass("current") && i-1 >= 0) {
$(this).removeClass("current");
$(pagesTop.get(i-1)).addClass("current");
$(resultsPages.get(i)).hide();
$(resultsPages.get(i-1)).show();
asset11_updateResultsRange(i-1);
return false;
}
});
pagesBottom.each(function(i) {
if($(this).hasClass("current") && i-1 >= 0) {
$(this).removeClass("current");
$(pagesBottom.get(i-1)).addClass("current");
$(resultsPages.get(i)).hide();
$(resultsPages.get(i-1)).show();
return false;
}
});
}
function asset11_nextPage() {
var pagesTop = $('#asset11 .top .pagination .paginationpage');
var pagesBottom = $('#asset11 .bottom .pagination .paginationpage');
var resultsPages = $('#asset11 .results_page');
pagesTop.each(function(i) {
if($(this).hasClass("current") && i+1 < pagesTop.length) {
$(this).removeClass("current");
$(pagesTop.get(i+1)).addClass("current");
$(resultsPages.get(i)).hide();
$(resultsPages.get(i+1)).show();
asset11_updateResultsRange(i+1);
return false;
}
});
pagesBottom.each(function(i) {
if($(this).hasClass("current") && i+1 < pagesBottom.length) {
$(this).removeClass("current");
$(pagesBottom.get(i+1)).addClass("current");
$(resultsPages.get(i)).hide();
$(resultsPages.get(i+1)).show();
return false;
}
});
}
function asset11_displayResultsPage(index) {
var pagesTop = $('#asset11 .top .pagination .paginationpage');
var pagesBottom = $('#asset11 .bottom .pagination .paginationpage');
var resultsPages = $('#asset11 .results_page');
resultsPages.each(function(i) {
$(this).hide();
});
pagesTop.each(function(i) {
$(this).removeClass("current");
});
pagesBottom.each(function(i) {
$(this).removeClass("current");
});
$(pagesTop.get(index)).addClass("current");
$(pagesBottom.get(index)).addClass("current");
$(resultsPages.get(index)).show();
asset11_updateResultsRange(index);
}
function asset11_updateResultsRange(pageNumber) {
var resultsPages = $('#asset11 .results_page');
var startResultNumber;
var endResultNumber;
if(pageNumber == 0) {
startResultNumber = 1;
endResultNumber = $(resultsPages.get(pageNumber)).children().length;
}
else {
var numResultsPerPage = $(resultsPages.get(0)).children().length;
startResultNumber = pageNumber*numResultsPerPage + 1;
endResultNumber = startResultNumber + $(resultsPages.get(pageNumber)).children().length - 1;
}
$('#asset11 .start_result_number').html(startResultNumber);
$('#asset11 .end_result_number').html(endResultNumber);
/*var pagesTop = $('#asset11 .top .pagination .page');
var pagesBottom = $('#asset11 .bottom .pagination .page');
var resultsPages = $('#asset11 .results_page');
resultsPages.each(function(i) {
$(this).hide();
});
pagesTop.each(function(i) {
$(this).removeClass("current");
});
pagesBottom.each(function(i) {
$(this).removeClass("current");
});
$(pagesTop.get(index)).addClass("current");
$(pagesBottom.get(index)).addClass("current");
$(resultsPages.get(index)).show();
*/
}
/********************************************************************************************************************************/
/********************************************************************************************************************************/
/* asset17.js */
var feedPos = 1;
var isEnd = false;
function getContent(url, pos)
{
$.get("/user_controls/GetSingleRSS.aspx?url=" + url + "&pos=" + pos, function(data){
if (data != '') {
isEnd = false;
var pattern = /([^<\/]+)<\/title>/i;
var textInsert = data.match(pattern);
var pattern = /([^<]+)<\/link>/i;
var linkInsert = data.match(pattern);
var htmlInsert = '';
if (textInsert.length > 0) {
htmlInsert = '';
}
$('#asset17 #feedBody #feedList').html(htmlInsert);
} else {
isEnd = true;
}
});
}
function getContentByPos(pos)
{
if (((feedPos + pos) > 0) && (isEnd != true)) {
feedPos = feedPos + pos;
getContent($('#hdnFeedURL').attr('value'), feedPos)
} else if ((pos < 0) && (feedPos > 1)) {
isEnd = false;
feedPos = feedPos + pos - 1;
getContent($('#hdnFeedURL').attr('value'), feedPos)
}
}
/********************************************************************************************************************************/
/********************************************************************************************************************************/
/* asset45.js */
function checkTabSelected()
{
//initialise tab selection
var tabs = new Array();
tabs['all'] = 'off';
tabs['personal'] = 'off';
tabs['business'] = 'off';
tabs['rural'] = 'off';
var result = window.location.href.split('filter=');
if (result.length>1) {
if (result[1]!='') {
tabs[result[1]] = 'on';
} else {
tabs['all'] = 'on';
}
} else {
tabs['all'] = 'on';
}
if (document.getElementById('asset45_tab_1') != null) {
document.getElementById('asset45_tab_1').className = 'tab_' + tabs['all'] + ((tabs['personal'] == 'on') ? '_nextselected': '');
document.getElementById('asset45_tab_2').className = 'tab_' + tabs['personal'] + ((tabs['business'] == 'on') ? '_nextselected': '');
document.getElementById('asset45_tab_3').className = 'tab_' + tabs['business'] + ((tabs['rural'] == 'on') ? '_nextselected': '');
document.getElementById('asset45_tab_4').className = 'tab_' + tabs['rural'] + '_last';
}
}
$(document).ready(function(){
checkTabSelected();
});
/********************************************************************************************************************************/
/********************************************************************************************************************************/
/* asset59.js */
$(document).ready(function(){
$('#asset59 .left').css('filter', 'alpha(opacity=50)');
$('#asset59 .left').css('opacity', '0.5');
$('#asset59 .middle').css('filter', 'alpha(opacity=50)');
$('#asset59 .middle').css('opacity', '0.5');
$('#asset59 .right').css('filter', 'alpha(opacity=50)');
$('#asset59 .right').css('opacity', '0.5');
});
/********************************************************************************************************************************/
/********************************************************************************************************************************/
/* asset64.js */
function asset64_setBackground(element, url) {
if(url != '') {
element.style.backgroundImage = "url('"+ url +"')";
}
}
/********************************************************************************************************************************/
/********************************************************************************************************************************/
/* asset84.js */
var baseInfo = document.getElementsByTagName("base");
if(baseInfo===null){
var baseHref = baseInfo[0].href
}
else{
var baseHref ="";
}
var FindaBranchSection = baseHref + "/section48.aspx"; //Enter respective Clone section ID here
var branchtimerID = null;
var branchhideTime = 1500;
function togglebranchSelectionList(dropDown)
{
var dropDownList = document.getElementById(dropDown);
//show or hide the dropdown box
if (dropDownList.style.visibility == 'visible') {
dropDownList.style.visibility = 'hidden';
dropDownList.style.display = 'none';
} else {
dropDownList.style.visibility = 'visible';
dropDownList.style.display = 'block';
}
togglebranchTimer(dropDown);
}
function togglebranchTimer(dropDown)
{
var dropDownList = document.getElementById(dropDown);
if ((branchtimerID == null) && (dropDownList.style.display == 'block')) {
//set the roll up timer for the dropdown box since it's visible
branchtimerID = setTimeout('togglebranchSelectionList("' + dropDown + '")', branchhideTime);
}
else {
//kill roll up timer
clearTimeout(branchtimerID);
branchtimerID = null;
}
}
function selectbranchOption(elem, selector, hideElem, changeElem)
{
//capture the selected link
var selOption = document.getElementById(changeElem);
selOption.value = elem.innerHTML;
//change the selected text
var dropSelected = document.getElementById(selector);
dropSelected.childNodes[0].nodeValue = elem.innerHTML;
//hide the dropdown box
var dropDownList = document.getElementById(hideElem);
dropDownList.style.visibility = 'hidden';
dropDownList.style.display = 'none';
togglebranchTimer(hideElem);
}
function changebranchTargetMini(selectedElem, dropDown)
{
var strQuery = FindaBranchSection
var selValue = document.getElementById(selectedElem).value;
var migrant, sevenDays, audioATM = "";
//use the selected value or the first link will be selected by default
selValue = ((selValue!='') && (selValue!=null))? selValue: document.getElementById(dropDown).getElementsByTagName('A')[0].innerHTML;
sevenDays = 'openSevenDays=0';
migrant = 'migrantBanking=0';
audioATM = 'audioATM=0';
strQuery += '?region=' + selValue + '&' + sevenDays + '&' + migrant + '&' + audioATM
//alert(strQuery);
window.location.href = strQuery;
}
/********************************************************************************************************************************/
/********************************************************************************************************************************/
/* asset9.js */
var asset9_defaultPage = 1;
var asset9_currentPage = 1;
var asset9_numOfPages = 0;
var asset9_currentATMPage = 1;
var asset9_numOfATMPages = 0;
function asset9_setSelectedTab() {
var id = "branches_tab";
var migrantBanking=0;
var openSevenDays=0;
var audioATM =0;
var queryString = window.location.search.substring(1);
var parameters = queryString.split("&");
for (i = 0; i 1) {changePage(elm[asset9_currentPage - 2],asset9_currentPage-1)}
}
function nextBranchPage(){
var elm = document.getElementsByClassName('branchpage')
var curElm
asset9_numOfPages = elm.length;
if (asset9_currentPage < asset9_numOfPages) {changePage(elm[asset9_currentPage],asset9_currentPage +1)}
}
function changePage(elm,id){
//alert('branchList-'+id);
asset9_currentPage = id;
branchResetPageNum();
elm.className = 'branchpage page_number current_page'
branchChangePage('branchList-'+id)
}
function branchResetPageNum(){
var elm = document.getElementsByClassName('branchpage')
for (var i = 0; i < elm.length; i++){
elm[i].className = 'branchpage page_number';
}
}
function branchChangePage(pageName){
var elm = document.getElementsByClassName('page')
for (var i = 0; i < elm.length; i++){
if (pageName == elm[i].id) {
elm[i].className = 'page page_On';
}
else{
elm[i].className = 'page page_Off';
}
}
}
//ATM list
function previousATMPage(){
var elm = document.getElementsByClassName('atmpaging')
var curElm
asset9_numOfATMPages = elm.length;
if (asset9_currentATMPage > 1) {changeATMPage(elm[asset9_currentATMPage - 2],asset9_currentATMPage-1)}
}
function nextATMPage(){
var elm = document.getElementsByClassName('atmpaging')
var curElm
asset9_numOfATMPages = elm.length;
if (asset9_currentATMPage < asset9_numOfATMPages) {changeATMPage(elm[asset9_currentATMPage],asset9_currentATMPage +1)}
}
function changeATMPage(elm,id){
//alert('branchList-'+id);
asset9_currentATMPage = id;
branchResetATMPageNum();
elm.className = 'atmpaging page_number current_page'
branchChangeATMPage('atmList-'+id)
}
function branchResetATMPageNum(){
var elm = document.getElementsByClassName('atmpaging')
for (var i = 0; i < elm.length; i++){
elm[i].className = 'atmpaging page_number';
}
}
function branchChangeATMPage(pageName){
var elm = document.getElementsByClassName('atmpage')
for (var i = 0; i < elm.length; i++){
if (pageName == elm[i].id) {
var he = elm[i].style.height;
elm[i].className = 'atmpage atmpage_On';
}
else{
elm[i].className = 'atmpage atmpage_Off';
}
}
}
$(document).ready(function(){
var height = 0;
var i = 0;
var elmID
var elm = document.getElementsByClassName('page')
for (i = 0; i < elm.length; i++){
elmID = elm[i].id;
if (height < $('#' + elmID).height()) {
height = $('#' + elmID).height()
}
}
for (i = 0; i < elm.length; i++){
elmID = elm[i].id;
$('#' + elmID).height(height);
if (i == 0) {
elm[i].className = 'page page_On';
}
else{
elm[i].className = 'page page_Off';
}
}
height=0;
i = 0;
elm = document.getElementsByClassName('atmpage')
for (i = 0; i < elm.length; i++){
elmID = elm[i].id;
if (height < $('#' + elmID).height()) {
height = $('#' + elmID).height()
}
}
for (i = 0; i < elm.length; i++){
elmID = elm[i].id;
$('#' + elmID).height(height);
if (i == 0) {
elm[i].className = 'atmpage atmpage_On';
}
else{
elm[i].className = 'atmpage atmpage_Off';
}
}
$('#atmlistblock').hide();
asset9_setAtmTab();
asset9_setSelectedTab();
});
/********************************************************************************************************************************/
/********************************************************************************************************************************/
/* asset35.js */
var FindaBranchSection = baseHref + "/section48.aspx"; //Enter respective Clone section ID here
var branchtimerID = null;
var branchhideTime = 1500;
function togglebranchSelectionList(dropDown)
{
var dropDownList = document.getElementById(dropDown);
//show or hide the dropdown box
if (dropDownList.style.visibility == 'visible') {
dropDownList.style.visibility = 'hidden';
dropDownList.style.display = 'none';
} else {
dropDownList.style.visibility = 'visible';
dropDownList.style.display = 'block';
}
togglebranchTimer(dropDown);
}
function togglebranchTimer(dropDown)
{
var dropDownList = document.getElementById(dropDown);
if ((branchtimerID == null) && (dropDownList.style.display == 'block')) {
//set the roll up timer for the dropdown box since it's visible
branchtimerID = setTimeout('togglebranchSelectionList("' + dropDown + '")', branchhideTime);
}
else {
//kill roll up timer
clearTimeout(branchtimerID);
branchtimerID = null;
}
}
function selectbranchOption(elem, selector, hideElem, changeElem)
{
//capture the selected link
var selOption = document.getElementById(changeElem);
selOption.value = elem.innerHTML;
//change the selected text
var dropSelected = document.getElementById(selector);
dropSelected.childNodes[0].nodeValue = elem.innerHTML;
//hide the dropdown box
var dropDownList = document.getElementById(hideElem);
dropDownList.style.visibility = 'hidden';
dropDownList.style.display = 'none';
togglebranchTimer(hideElem);
}
function changebranchTarget(selectedElem, dropDown)
{
var strQuery = FindaBranchSection
var selValue = document.getElementById(selectedElem).value;
var migrant, sevenDays, audioATM = "";
//use the selected value or the first link will be selected by default
selValue = ((selValue!='') && (selValue!=null))? selValue: document.getElementById(dropDown).getElementsByTagName('A')[0].innerHTML;
sevenDays = (document.branchSearchPanel.SevenDays.checked) ? 'openSevenDays=1':'openSevenDays=0';
migrant = (document.branchSearchPanel.Migrant.checked) ? 'migrantBanking=1':'migrantBanking=0';
audioATM = (document.branchSearchPanel.audioATM.checked) ? 'audioATM=1':'audioATM=0';
var selectedTab = 'branches';
if (document.branchSearchPanel.audioATM.checked){
selectedTab = "atm";
}
else {
selectedTab = "branches";
}
tab = 'tab=' + selectedTab;
strQuery += '?region=' + selValue + '&' + sevenDays + '&' + migrant + '&' + audioATM + '&' + tab;
//alert(strQuery);
window.location.href = strQuery;
}
//Load method to check for query string parameters
$(document).ready(function(){
//Ziaul:Mean query string retrieval in JavaScript
var objURL = new Object();
window.location.search.replace(new RegExp( "([^?=&]+)(=([^&]*))?", "g" ),function( $0, $1, $2, $3 ){objURL[ $1 ] = $3;});
//for (var strKey in objURL){
// document.write("" + strKey + ": ");
// document.write(objURL[ strKey ] + "
");
//}
var objNode = document.getElementById( "branchSelect" );
var selOption = document.getElementById( "branchselectedOption" );
if (objNode && objURL["region"]){
objNode.childNodes[0].nodeValue = unescape(objURL["region"]);
selOption.value = unescape(objURL["region"]);
}
if (objURL["openSevenDays"] == '1'){
document.branchSearchPanel.SevenDays.checked = 'checked';
}
if (objURL["migrantBanking"] == '1'){
document.branchSearchPanel.Migrant.checked = 'checked';
}
if (objURL["audioATM"] == '1'){
document.branchSearchPanel.audioATM.checked = 'checked';
}
});
/********************************************************************************************************************************/
/********************************************************************************************************************************/
/* asset56.js */
function asset56_changeTab(object)
{
hideAllTabBlocks();
var tabid=object.id;
var tabblockid=tabid.substring(12);
showTabBlock('asset56_content_'+tabblockid);
var tabs=getAllTabs('asset56_tab_',document.getElementById('asset56_tab_container'),'div');
var numoftabs=tabs.length;
for (var i=0; i 1 )
{
cookie_value = unescape( a_temp_cookie[1].replace(/^\s+|\s+$/g, '') );
}
// note that in cases where cookie is initialized but no value, null is returned
return cookie_value;
break;
}
a_temp_cookie = null;
cookie_name = '';
}
if ( !b_cookie_found )
{
return null;
}
}
/********************************************************************************************************************************/
var globalCurrentSectionID = 1;
//Show or hide cookie panel used by common 6
$(document).ready(function(){
var cookieCont = $("#CookieBtnContainer");
if (cookieCont != null){
if(Get_Cookie('StartPage') == globalCurrentSectionID){
$("#CookieBtnContainer").hide();
return false;
}
else
{
var leftPos = 0;
var contWidth = 68;
if ($.browser.msie && $.browser.version.substr(0,1)<7){
contWidth = 77;
}
li = $(".onmenu").width();
$("li.onmenu").css("width",(li)+"px");
$("a.onmenu").css("width",(li - 50)+"px");
$("#CookieBtnContainer").css("left",((li/2) - contWidth) + "px");
$("#CookieBtnContainer").css("width","137px");
}
}
})
/********************************************************************************************************************************/
function SetStartPageSelector(sID){
$("#CookieStateLink").css("background-image","url(site_images/inc/images/SetHomePageCookie_state3.gif)");
$("#CookieBtnContainer").fadeOut(1500);
SetStartPageCookie(sID);
}
/********************************************************************************************************************************/