// JavaScript Document

function do_tracked_link(the_url, section_name, new_window, w, h, do_scroll)
{
	var s=s_gi('telstraglobalprd,telstrabpbigpondprd'); s.linkTrackVars='prop1,prop2,prop3,channel'; s.prop1='BP'; s.prop2='BP'; s.prop3='BP.com'; s.pageName=s.prop1+':'+s.prop2+':'+s.prop2+':'+s.channel+':Link to '+section_name; void(s.tl(true,'o',':Link to ' +section_name) );
	
	target = 'child';
	
	if(new_window == "popup")
	{
		winprops = 'height='+h+',width='+w+',scrollbars='+do_scroll+',resizable=false'
	}
	else if(new_window == "yes")
	{
		winprops = '';
	}

	if(new_window == "no")
	{
		window.location = the_url;
	}
	else
	{
	win = window.open(the_url, target, winprops);
	//win.focus();
	if (parseInt(navigator.appVersion) >= 4) { win.focus(); }
	}
}

function html_track_link(section_name)
{
	var s=s_gi('telstraglobalprd,telstrabpbigpondprd'); s.linkTrackVars='prop1,prop2,prop3,channel'; s.prop1='BP'; s.prop2='BP'; s.prop3='BP.com'; s.pageName=s.prop1+':'+s.prop2+':'+s.prop2+':'+s.channel+':Link to '+section_name; void(s.tl(true,'o',':Link to ' +section_name) );
}

function new_window_flash(mypage, myname, w, h, scroll) 
{
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable=false'
	win = window.open(mypage, myname, winprops)
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}


function new_window(aPage, aTarget, w, h, var1, var2)
{
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	
	child = window.open(aPage,aTarget,'status=no,scrollbars=' +((var1=='scroll' || var2=='scroll')? 'yes' : 'no')+ ',resizable=' +((var1=='resize' || var2=='resize')? 'yes' : 'no')+ ',width='+w+',height='+h +',left = '+winl +',top = ' +wint);

	if (window.focus) 
	{
		child.focus();
	}
	return false;
}


//used for live chat button

function do_submit(form)
{
	if (!navigator.javaEnabled()) document.write("This browser does not have Java enabled.");
var submit_accepted = false;
var width = 525;
var height= 600;
if (navigator.platform != 'MacPPC')
{
        if (navigator.appName == "Microsoft Internet Explorer")
              {width=238;height=245;}
        else if (parseInt(navigator.appVersion) > 4)
              {width=600;height=450;}
        else
    	  {
        width=window.outerWidth;
        if (width < 800) width=800;
        height=window.outerHeight;
        if (height <600) height=600;
    	  }
} else {
        if (navigator.appName == "Microsoft Internet Explorer")
              {width=525;height=500;}
        else if (parseInt(navigator.appVersion) < 5)
              {width=850;height=600;}
        else  {width=525;height=500;}
}
	
    if (submit_accepted) // prevents NN4 resubmission
        return(false);

    submit_accepted = true;

    child = window.open('', "chat_window",'resizable=yes,scrollbars=no,width='+width+',height='+height);
	if (window.focus) 
	{
		child.focus();
	}
    form.submit();

    return(false);
}
