

// Global variables

var currentTab,currentLink;



// Change if you want to use another class for highlighting

var tabHighlightClass='tabon'; 


function initTabs()

{

// change if you have another main navigation ids for tabbed or normal element id

	var navElement='mainnav1';

	var navElementTabbedId='mainnavtabbed1';

	

// pattern to check against to identify "back to menu" links

	var backToMenu=/#top/;



	var n,as,id,i,cid,linklength,lastlink,re;

	if(document.getElementById && document.createTextNode)

	{

		cid=window.location.toString().match(/#(\w.+)/);

		if (cid && cid[1])

		{

			cid=cid[1];

		}

		var n=document.getElementById(navElement);

		n.id=navElementTabbedId;

		n=document.getElementById(navElementTabbedId)

		var as=n.getElementsByTagName('a');

		for (i=0;i<as.length;i++)

		{

			as[i].onclick=function(){showTab(this);return false}

			//as[i].onkeypress=function(){showTab(this);return false}

			id=as[i].href.match(/#(\w.+)/)[1];

			if(!cid && i==0)

			{

				currentTab=id;

				currentLink=as[i];

			} else if(id==cid)

			{

				currentTab=id;

				currentLink=as[i];

			}

			if(document.getElementById(id))

			{

				linklength=document.getElementById(id).getElementsByTagName('a').length;

				if(linklength>0)

				{

					lastlink=document.getElementById(id).getElementsByTagName('a')[linklength-1]

					if(backToMenu.test(lastlink.href))

					{

						lastlink.parentNode.removeChild(lastlink);

					}

				}

				document.getElementById(id).style.display='none';

			}

			if(cid){window.location.hash='top';}

		}		





		if(document.getElementById(currentTab))

		{

			document.getElementById(currentTab).style.display='block';

		}

		re=new RegExp('\\b'+tabHighlightClass+'\\b');

		if(!re.test(currentLink.className))

		{

			currentLink.className=currentLink.className+' '+tabHighlightClass

		}

	}

}  

function showTab(o)

{

	var id;

	if(currentTab)

	{

		if(document.getElementById(currentTab))

		{

			document.getElementById(currentTab).style.display='none';

		}

		currentLink.className=currentLink.className.replace(tabHighlightClass,'')

	}

	var id=o.href.match(/#(\w.+)/)[1];

	currentTab=id;

	currentLink=o;

	if(document.getElementById(id))

	{

		document.getElementById(id).style.display='block';

	}

	var re=new RegExp('\\b'+tabHighlightClass+'\\b');

	if(!re.test(o.className))

	{

		o.className=o.className+' '+tabHighlightClass

	}

}

//----------DHTML Menu Created using AllWebMenus PRO ver 5.0-#702---------------
//C:\Users\Andy\Desktop\online shells\menu system\onlineshells.awm
var awmMenuName='menu';
var awmLibraryBuild=702;
var awmLibraryPath='/../java';
var awmImagesPath='/../java';
var awmSupported=(navigator.appName + navigator.appVersion.substring(0,1)=="Netscape5" || document.all || document.layers || navigator.userAgent.indexOf('Opera')>-1 || navigator.userAgent.indexOf('Konqueror')>-1)?1:0;
if (awmAltUrl!='' && !awmSupported) window.location.replace(awmAltUrl);
if (awmSupported){
var nua=navigator.userAgent,scriptNo=(nua.indexOf('Safari')>-1)?7:(nua.indexOf('Gecko')>-1)?2:((document.layers)?3:((nua.indexOf('Opera')>-1)?4:((nua.indexOf('Mac')>-1)?5:1)));
var mpi=document.location,xt="";
var mpa=mpi.protocol+"//"+mpi.host;
var mpi=mpi.protocol+"//"+mpi.host+mpi.pathname;
if(scriptNo==1){oBC=document.all.tags("BASE");if(oBC && oBC.length) if(oBC[0].href) mpi=oBC[0].href;}
while (mpi.search(/\\/)>-1) mpi=mpi.replace("\\","/");
mpi=mpi.substring(0,mpi.lastIndexOf("/")+1);
var e=document.getElementsByTagName("SCRIPT");
for (var i=0;i<e.length;i++){if (e[i].src){if (e[i].src.indexOf(awmMenuName+".js")!=-1){xt=e[i].src.split("/");if (xt[xt.length-1]==awmMenuName+".js"){xt=e[i].src.substring(0,e[i].src.length-awmMenuName.length-3);if (e[i].src.indexOf("://")!=-1){mpi=xt;}else{if(xt.substring(0,1)=="/")mpi=mpa+xt; else mpi+=xt;}}}}}
while (mpi.search(/\/\.\//)>-1) {mpi=mpi.replace("/./","/");}
var awmMenuPath=mpi.substring(0,mpi.length-1);
while (awmMenuPath.search("'")>-1) {awmMenuPath=awmMenuPath.replace("'","&#39;");}
document.write("<SCRIPT SRC='"+awmMenuPath+awmLibraryPath+"/awmlib"+scriptNo+".js'><\/SCRIPT>");
var n=null;
awmzindex=100;
}

var awmImageName='';
var awmPosID='';
var awmSubmenusFrame='';
var awmSubmenusFrameOffset;
var awmOptimize=0;
var awmUseTrs=0;
var awmSepr=["0","","",""];
function awmBuildMenu(){
if (awmSupported){
awmImagesColl=["home.jpg",115,30,"home_over.jpg",115,30,"info.jpg",115,30,"info_over.jpg",115,30,"onlineshellslogo.jpg",200,19,"offers.jpg",115,30,"offers_over.jpg",115,30,"reviews.jpg",115,30,"reviews_over.jpg",115,30,"myaccount.jpg",115,30,"myaccount_over.jpg",115,30,"contact.jpg",115,30,"contact_over.jpg",115,30];
awmCreateCSS(0,1,0,n,'#4E90DF',n,n,n,'none',0,'#000000',0,0);
awmCreateCSS(1,2,1,'#949494','#FFFFFF',n,'bold 11px Tahoma',n,'none',0,'#000000','0px 0px 0px 0',1);
awmCreateCSS(0,2,1,'#FFFFFF','#FFFFFF',n,'bold 11px Tahoma',n,'none',0,'#000000','0px 0px 0px 0',1);
awmCreateCSS(1,2,1,'#949494','#FFFFFF',n,'bold 11px Tahoma',n,'none',0,'#000000','0px 0px 0px 0',0);
awmCreateCSS(0,2,1,'#FFFFFF','#FFFFFF',n,'bold 11px Tahoma',n,'none',0,'#000000','0px 0px 0px 0',0);
awmCreateCSS(1,2,1,'#FFFFFF','#FFFFFF',n,'14px sans-serif',n,'none',0,'#000000','4px 0px 4px 0',0);
awmCreateCSS(0,2,1,'#FFFFFF','#FFFFFF',n,'14px sans-serif',n,'none',0,'#000000','4px 0px 4px 0',0);
awmCreateCSS(0,1,0,n,'#4E90DF',n,n,n,'solid',1,'#808080',0,0);
awmCreateCSS(1,2,1,'#949494','#FFFFFF',n,'bold 13px Tahoma',n,'none',0,'#000000','6px 8px 6px 8',1);
awmCreateCSS(0,2,1,'#FFFFFF','#E78210',n,'bold 13px Tahoma',n,'none',0,'#000000','6px 8px 6px 8',1);
var s0=awmCreateMenu(0,0,0,0,1,0,0,0,0,10,10,0,1,0,2,0,1,n,n,100,1,0,0,0,0,-1,1,200,200,0,0,0,"0,0");
it=s0.addItemWithImages(1,2,2,"","","","",0,1,1,3,3,3,n,n,n,"http://www.onlineshells.co.uk",n,n,n,"http://www.onlineshells.co.uk",n,0,0,2,n,n,n,n,n,n,0,0,0,0);
it=s0.addItemWithImages(3,4,4,"","","","",2,3,3,3,3,3,n,n,n,"",n,n,n,n,n,0,0,2,n,n,n,n,n,n,0,0,0,0);
var s1=it.addSubmenu(0,0,-1,0,0,0,0,7,1,1,0,n,n,100,-1,1,200,-1,1,200,200,0,0);
it=s1.addItem(8,9,9,"About Us",n,n,"","http://www.onlineshells.co.uk/pages.php?page=about",n,n,n,"http://www.onlineshells.co.uk/pages.php?page=about",n,0,0,2,0);
it=s1.addItem(8,9,9,"Delivery",n,n,"","http://www.onlineshells.co.uk/pages.php?page=delivery",n,n,n,"http://www.onlineshells.co.uk/pages.php?page=delivery",n,0,0,2,0);
it=s1.addItem(8,9,9,"Product Size Guide",n,n,"","http://www.onlineshells.co.uk/pages.php?page=size",n,n,n,"http://www.onlineshells.co.uk/pages.php?page=size",n,0,0,2,0);
it=s1.addItem(8,9,9,"Terms and Conditions",n,n,"","http://www.onlineshells.co.uk/pages.php?page=terms",n,n,n,"http://www.onlineshells.co.uk/pages.php?page=terms",n,0,0,2,0);
it=s1.addItem(8,9,9,"Privacy Policy",n,n,"","http://www.onlineshells.co.uk/pages.php?page=privacy",n,n,n,"http://www.onlineshells.co.uk/pages.php?page=privacy",n,0,0,2,0);
it=s1.addItem(8,9,9,"Environmental Policy",n,n,"","http://www.onlineshells.co.uk/pages.php?page=environment",n,n,n,"http://www.onlineshells.co.uk/pages.php?page=environment",n,0,0,2,0);
it=s1.addItem(8,9,9,"Public Sector Procurement",n,n,"","http://www.onlineshells.co.uk/pages.php?page=procurement",n,n,n,"http://www.onlineshells.co.uk/pages.php?page=procurement",n,0,0,2,0);
it=s1.addItemWithImages(5,6,6,"","","","",4,4,4,3,3,3,n,n,n,"",n,n,n,n,n,0,0,0,n,n,n,n,n,n,0,0,0,0);
it=s0.addItemWithImages(3,4,4,"","","","",5,6,6,3,3,3,n,n,n,"",n,n,n,n,n,0,0,2,n,n,n,n,n,n,0,0,0,0);
var s1=it.addSubmenu(0,0,-1,0,0,0,0,7,1,1,0,n,n,100,-1,2,200,-1,1,200,200,0,0);
it=s1.addItem(8,9,9,"Weekly Offers",n,n,"","http://www.onlineshells.co.uk/specials.php",n,n,n,"http://www.onlineshells.co.uk/specials.php",n,0,0,2,0);
it=s1.addItem(8,9,9,"Bargain Basement",n,n,"","http://www.onlineshells.co.uk/bbargain-cornerb-c-70.html",n,n,n,"http://www.onlineshells.co.uk/bbargain-cornerb-c-70.html",n,0,0,2,0);
it=s1.addItemWithImages(5,6,6,"","","","",4,4,4,3,3,3,n,n,n,"",n,n,n,n,n,0,0,0,n,n,n,n,n,n,0,0,0,0);
it=s0.addItemWithImages(1,2,2,"","","","",7,8,8,3,3,3,n,n,n,"http://www.onlineshells.co.uk/reviews.php",n,n,n,"http://www.onlineshells.co.uk/reviews.php",n,0,0,2,n,n,n,n,n,n,0,0,0,0);
it=s0.addItemWithImages(3,4,4,"","","","",9,10,10,3,3,3,n,n,n,"",n,n,n,n,n,0,0,2,n,n,n,n,n,n,0,0,0,0);
var s1=it.addSubmenu(0,0,-1,0,0,0,0,7,1,1,0,n,n,100,-1,3,200,-1,1,200,200,0,0);
it=s1.addItem(8,9,9,"Log In",n,n,"","http://www.onlineshells.co.uk/login.php",n,n,n,"http://www.onlineshells.co.uk/login.php",n,0,0,2,0);
it=s1.addItem(8,9,9,"View / Edit Account",n,n,"","http://www.onlineshells.co.uk/account.php",n,n,n,"http://www.onlineshells.co.uk/account.php",n,0,0,2,0);
it=s1.addItem(8,9,9,"View Past Orders",n,n,"","http://www.onlineshells.co.uk/account_history.php",n,n,n,"http://www.onlineshells.co.uk/account_history.php",n,0,0,2,0);
it=s1.addItem(8,9,9,"Log Off",n,n,"","http://www.onlineshells.co.uk/logoff.php",n,n,n,"http://www.onlineshells.co.uk/logoff.php",n,0,0,2,0);
it=s1.addItemWithImages(5,6,6,"","","","",4,4,4,3,3,3,n,n,n,"",n,n,n,n,n,0,0,0,n,n,n,n,n,n,0,0,0,0);
it=s0.addItemWithImages(1,2,2,"","","","",11,12,12,3,3,3,n,n,n,"http://www.onlineshells.co.uk/contact_us.php",n,n,n,"http://www.onlineshells.co.uk/contact_us.php",n,0,0,2,n,n,n,n,n,n,0,0,0,0);
s0.pm.buildMenu();
}}
window.onload=function(){
	initTabs();
	}


