<!--
//get platform info
	agt=navigator.userAgent.toLowerCase();
	ie=(document.all) ? 1:0
	if(ie){
		ie4=(agt.indexOf('msie 4.01')!=-1) ? 1:0
		ie5=(agt.indexOf('msie 5.01')!=-1) ? 1:0
		}
	else { ie4=0;ie5=0 }

	ns=(document.layers) ? 1:0
	ns6=(document.getElementById && !document.all) ? 1:0
	
	win=( (agt.indexOf("win")!=-1) || (agt.indexOf("16bit")!=-1) )
	mac=(agt.indexOf("mac")!=-1);

	var imgs=(document.images) ? 1:0

//image swapper
var clickedimg="";
var overimg="";

function swpimg(theimg,newsrc){
if(imgs){
	oldsrc=document.images[theimg].src; 
	overimg=theimg;
	document.images[theimg].src=newsrc;
	}
}
function swpback(){
if(overimg!="" && overimg!=clickedimg){
	if(imgs){ document.images[overimg].src=oldsrc; }
	}
}

/* POPUP WINDOWS */
function icons_popup(icon){
	popup = "icons = window.open('icons/" + icon + ".jsp','vodafone','width=200,height=100,titlebar=0');";
	popup = eval(popup);
	icons.focus();
}
function sitemap_popup(){
	popup = "sitemap = window.open('/sitemap.jsp','sitemap','width=510,height=400,scrollbars=1');";
	popup = eval(popup);
	sitemap.focus();
}
/* Knowledgebase popups */
function help_popup(){
	popup = "help = window.open('http://vodafonenz.custhelp.com','help','width=800,height=550,scrollbars=1,toolbar=1,resizeable=1');";
	popup = eval(popup);
	help.focus();
}
function kbgeneric_popup(url){ /* You can pass this one a specific URL */
	popup = "help = window.open('" + url + "','help','width=800,height=550,scrollbars=1,toolbar=1,resizeable=1');";
	popup = eval(popup);
	help.focus();
}
function kbitem_popup(id){ /* You can pass in a KB item ID to display specific answer */
	popup = "kbitem = window.open('http://vodafonenz.custhelp.com/cgi-bin/vodafonenz.cfg/php/enduser/std_adp.php?p_faqid=" + id + "','help','width=800,height=550,scrollbars=1,toolbar=1,resizeable=1');";
	popup = eval(popup);
	kbitem.focus();
}
function kbsearch_popup(searchterm){ /* Passes in a search keyword */
	popup = "kbsearch = window.open('http://vodafonenz.custhelp.com/cgi-bin/vodafonenz.cfg/php/enduser/std_alp.php?p_search_text=" + searchterm + "','help','width=800,height=550,scrollbars=1,toolbar=1,resizeable=1');";
	popup = eval(popup);
	kbsearch.focus();
}
function kbgames_popup(searchterm){ /* Specific for searching about games in the KB */
	popup = "help = window.open('http://vodafonenz.custhelp.com/cgi-bin/vodafonenz.cfg/php/enduser/std_alp.php?p_sid=wKiz1sSh&p_lva=&p_li=&p_page=1&p_cv=2.722&p_pv=&p_prods=&p_cats=651%2C722&p_hidden_prods=&cat_lvl1=651&cat_lvl2=722&p_search_text=" + searchterm + "&x=0&y=0&p_new_search=1','help','width=800,height=550,scrollbars=1,toolbar=1,resizeable=1');";
	popup = eval(popup);
	help.focus();
}
function contact_popup(){ /* Launches the contact page */
	popup = "help = window.open('http://vodafonenz.custhelp.com/cgi-bin/vodafonenz.cfg/php/enduser/ask.php','help','width=800,height=550,scrollbars=1,toolbar=1,resizeable=1');";
	popup = eval(popup);
	help.focus();
}
function myhelp_popup(){ /* Launches My Help section of KB */
	popup = "help = window.open('http://vodafonenz.custhelp.com/cgi-bin/vodafonenz.cfg/php/enduser/myq_ilp.php','help','width=800,height=550,scrollbars=1,toolbar=1,resizeable=1');";
	popup = eval(popup);
	help.focus();
}

function generic_popup(pagename){
	popup = "new_popup = window.open('" + pagename + "','new_popup','width=450,height=400,scrollbars=1,toolbar=1,resizeable=1');";
	popup = eval(popup);
	new_popup.focus();
}
/* Games subsite popups*/
function games_popup(siteUrl){ /* generic popup. can provide URL if desired, otherwise default to homepage */
	if(!siteUrl){
		sitepage = "http://games.vodafone.co.nz";
	} else {
		sitepage = siteUrl;
	}
	popup = "help = window.open('" + sitepage + "','help','width=800,height=550,scrollbars=1,toolbar=1,resizeable=1');";
	popup = eval(popup);
	help.focus();
}
function games_search_popup(searchterm){
	popup = "help = window.open('http://games.vodafone.co.nz/index.php?p=4.1&device-list=0&textsearch=" + searchterm + "','help','width=800,height=550,scrollbars=1,toolbar=1,resizeable=1');";
	popup = eval(popup);
	help.focus();
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
function popup(page,width,height){
	width = (width == undefined) ? 510 : width;
	height = (height == undefined) ? 400 : height;
	strPopup = "promo = window.open('" + page + "','popup','width=" + width + ",height=" + height + ",scrollbars=1');";
	strPopup = eval(strPopup);
	promo.focus();
}
function compare(page,width,height){
	width = (width == undefined) ? 790 : width;
	height = (height == undefined) ? 560 : height;
	strPopup = "compare = window.open('" + page + "','compare','width=" + width + ",height=" + height + ",toolbars=0,addressbar=0,scrollbars=1');";
	strPopup = eval(strPopup);
	compare.focus();
}
function simCard(mobile_id){
	popup = "simcard = window.open('/mobiles/sim_card.jsp?simImage="+mobile_id+"','simcard','width=450,height=350,scrollbars=1,status=1,resizable=1');";
	popup = eval(popup);
	simcard.focus();
}
//-->
