//miscellaneous declarations
var blnLinkable = false;
var strSubHeadLink="";
var blnHomePage=false;

//-----------------------------------------------------------------------------------
//Used for Dictionary Pop-up and banking Code/Important Info pop-ups
//----------------------------------------------------------------------------------
function openHelpWindow(targetURL) {
	menu = window.open(targetURL,"helpwin","menubar=no,toolbar=no,scrollbars=yes,status=no,width=550,height=550,top=20,left=20")
	}
	
//----------------------------------------------------------------------------------

function openStockWindow(targetURL) {
	menu = window.open(targetURL,"helpwin","menubar=no,toolbar=no,scrollbars=yes,status=no,width=500,height=450,top=20,left=20,resizable")
	}


//Used for links to external sites where toolbar required
//----------------------------------------------------------------------------------
function externalSite(targetURL) {
	menu = window.open(targetURL,"helpwin","menubar=yes,toolbar=yes,scrollbars=auto,status=no,width=750,height=500,top=20,left=20")
	}
function blankWindow(targetURL) {
	menu = window.open(targetURL,"helpwin","menubar=yes,toolbar=yes,scrollbars=auto,status=yes,top=20,left=20,resizable,location")
	}
	function blankSpecialWindow(targetURL) {
	menu = window.open(targetURL,"helpwin","menubar=yes,toolbar=yes,scrollbars=yes,status=yes,top=20,left=20,resizable,location")
	}
	
//-----------------------------------------------------------------------------------
//Used for sharedealing app form pop up
//-----------------------------------------------------------------------------------
	
	function openShareAppWindow(targetURL) {
	menu = window.open(targetURL,"Sharedealing","menubar=no,toolbar=no,scrollbars=yes,status=no,width=790,height=600,top=0,left=0")
	}	

//-----------------------------------------------------------------------------------
//Used for car centre pop up
//----------------------------------------------------------------------------------
function openCarCentre(targetURL) {
	menu = window.open(targetURL,"CarCentre","menubar=no,toolbar=no,scrollbars=yes,status=no,width=790,height=525,top=20,left=20")
	}	
//-----------------------------------------------------------------------------------
//Used for car centre pop up
//----------------------------------------------------------------------------------
function openFirstTimeBuyers(targetURL) {
	menu = window.open(targetURL,"CarCentre","menubar=no,toolbar=no,scrollbars=yes,status=no,width=790,height=548,top=20,left=20")
	}		
//-----------------------------------------------------------------------------------
//Used for Internet Banking Help Pop-up
//----------------------------------------------------------------------------------
function openIntbkHelpWindow(targetURL) {
	menu = window.open(targetURL,"helpwin","menubar=no,toolbar=no,scrollbars=yes,resizable=yes, status=no,width=780,height=500,top=20,left=5")
	}
	
	//-----------------------------------------------------------------------------------
//Used for Contact Us and Website Feedback Pop-ups
//----------------------------------------------------------------------------------
function contctus(targetURL) {
	menu = window.open(targetURL,"helpwin","menubar=no,toolbar=no,scrollbars=yes,resizable=yes, status=no,width=540,height=600,top=20,left=20")
	}
	
//-----------------------------------------------------------------------------------
//Used for application request Pop-up
//----------------------------------------------------------------------------------
function openAppReqWindow(targetURL) {
	menu = window.open(targetURL,"helpwin","menubar=no,toolbar=no,scrollbars=yes,status=no,resizable=1,width=550,height=420,top=20,left=20")
	}
	
//-----------------------------------------------------------------------------------
//Used for Call me Pop-up
//----------------------------------------------------------------------------------
function openCallWindow(targetURL) {
	menu = window.open(targetURL,"helpwin","menubar=no,toolbar=no,scrollbars=yes,resizeable=1,status=no,width=550,height=420,top=20,left=20")
	}

//-----------------------------------------------------------------------------------
//Used for Request Leaflet Pop-up
//----------------------------------------------------------------------------------
function openReqLeafletWindow(accountname) {
	url = 'http://www.nationwide.co.uk/include/ReqLeaflet.asp?' + accountname + "=on";
	reqleaflet = window.open(url,"reqleaflet","menubar=no,toolbar=no,scrollbars=yes,resizeable=1,status=no,width=790,height=590,top=20,left=0")
}
		
//--------------------------------
//Budget Planner Pop-up
//-------------------------------

function openBudgetPlanner(){
	features = "width=650,height=450,top=20,left=20,scrollbars=1,resizable=1,status=0,statusbar=0,menubars=0,";
	winname = "budgetplanner";
	this_href = "budget-planner.htm";
	budgetplanner = window.open(this_href,winname,features);
	if(focus){
		budgetplanner.focus();
	}
}

//-----------------------------------------------------------------------------------
//Used for MS Money Pop Up's
//----------------------------------------------------------------------------------
function openMSMoney(targetURL) {
	menu = window.open(targetURL,"msmoney","menubar=no,toolbar=no,scrollbars=auto,status=no,width=550,height=540,top=0,left=20")
	}

//--------------------------------
//Internet Banking section pop-ups
//-------------------------------

//Wap Demo Pop up
function openWapWindow(targetURL) {
	var wapWin = window.open(targetURL,"wapWin","menubar=no,toolbar=no,scrollbars=no,status=no,width=655,height=400,top=20,left=20");
	if(focus){
		wapWin.focus();
	}
}
	
//PDA Demo Pop up
function openPdaWindow(targetURL) {
	var pdaWin = window.open(targetURL,"pdaWin","menubar=no,toolbar=no,scrollbars=no,status=no,width=320,height=550,top=20,left=20");
	if(focus){
		pdaWin.focus();
	}
}
	
//WAP phones pop up
function openPhone(targetURL) {
	var phoneWin = window.open(targetURL,"phoneWin","menubar=no,toolbar=no,scrollbars=no,status=no,width=100,height=280,top=20,left=20");
	if(focus){
		phoneWin.focus();
	}
}

//----------------------------------------------------------------------------------------
//Used for Remortgage in a Bag help pop up
//----------------------------------------------------------------------------------------
function remortgageWindow(targetURL) {
	menu = window.open(targetURL,"helpwin","menubar=no,toolbar=no,scrollbars=auto,status=no,width=550,height=520,top=20,left=20")
	}

//-----------------------------------------------------------------------------------------
//Used for Phone number pop-up's - makes phone numbers more usable for speech readers
//-----------------------------------------------------------------------------------------
function phoneWindow(targetURL) {
	menu = window.open(targetURL,"helpwin","menubar=no,toolbar=no,scrollbars=auto,status=no,width=320,height=290,top=30,left=30")
	}
	
//-----------------------------------------------------------------------------------
//Used for Dictionary Pop-up and banking Code/Important Info pop-ups
//----------------------------------------------------------------------------------
function openCompWindow(targetURL) {
	menu = window.open(targetURL,"compwin","menubar=no,toolbar=no,scrollbars=yes,status=no,width=600,height=550,top=20,left=20")
	}
	
//----------------------------------------------------------------------------------
//-----------------------------------------------------------------------------------
//Used for E-mail fraud pop-ups
//----------------------------------------------------------------------------------
function openMailWindow(targetURL) {
	menu = window.open(targetURL,"helpwin","menubar=no,toolbar=no,scrollbars=yes,status=no,width=400,height=385,top=20,left=20")
	}
	
//----------------------------------------------------------------------------------	
//-----------------------------------------------------------------------------------------
//Used for Intermediaries pop-up's on MTE section
//-----------------------------------------------------------------------------------------
function MteWindow(targetURL) {
	menu = window.open(targetURL,"mtewin","menubar=no,toolbar=no,scrollbars=auto,status=no,width=550,height=350,top=30,left=30")
	}
	
//Used for register Pop-up in intermediaries
//----------------------------------------------------------------------------------
function openPopWindow(targetURL) {
	menu = window.open(targetURL,"helpwin","menubar=no,toolbar=no,scrollbars=yes,status=yes,width=700,height=500,top=20,left=20")
	}
	
//----------------------------------------------------------------------------------
	
	



//--------------------------------------------------
//DEBUG CODE - Please leave intact, even on live,
//as this will help in resolving problems later
//--------------------------------------------------

// global variable - can enable for whole site ¬
var debug="off";
//debug="on"

// otherwise allow temporary debug by typing ?debug into
// address bar at the end of the URL and hitting [RETURN]
if (window.location.href.indexOf("debug")!=-1)	{debug="on"}

// ADD ANY NEW SCRIPTS THAT	ARE COMMON
// TO ALL (OR A LOT OF) PAGES BELOW HERE.

var strSearchString ="";

//miscellaneous declarations (Loans Section)

function openFinLease(type)	{
	var helpWin = window.open(' ' + type	+ '../guides/Finance_leasing/frameset.htm', 'helpWin', 'scrollbars,resizable,height=350,width=500,top=0,left=0');
	if(focus){
		helpWin.focus();
	}
}
function openGISC(type)	{
	var helpWin = window.open(' ' + type	+ '../important_info/GISC.htm', 'helpWin', 'scrollbars,resizable,height=350,width=500,top=0,left=0');
	if(focus){
		helpWin.focus();
	}
}
function openHelpConsole(type)	{
	var helpWin = window.open(' ' + type	+ '/frameset.htm', 'helpWin', 'scrollbars,resizable,height=350,width=500,top=0,left=0');
	if(focus){
		helpWin.focus();
	}
}
function openLoanCare(type)	{
	var helpWin = window.open(' ' + type	+ '.htm', 'helpWin', 'scrollbars=no,height=400,width=655,top=20,left=20');
	if(focus){
		helpWin.focus();
	}
}
function openPaymentProtect(type)	{
	var helpWin = window.open(' ' + type	+ '.htm', 'helpWin', 'scrollbars=no,height=400,width=655,top=20,left=20');
	if(focus){
		helpWin.focus();
	}
}
function openBudgetPlanner(){
	features = "width=650,height=570,top=20,left=20,scrollbars=1,resizable=1,status=1,statusbar=1,menubars=0,";
	winname = "budgetplanner";
	this_href = "budget-planner.htm";
	budgetplanner = window.open(this_href,winname,features);
	if(focus){
		budgetplanner.focus();
	}
}

//--------------------------------------------------
//DEBUG CODE - Please leave intact, even on live,
//as this will help in resolving problems later
//--------------------------------------------------

// global variable - can enable for whole site ¬
var debug="off";