/*
	Copyright 2010 by Edy Mueller / chilimedia.ch 
	
	Dieser Code darf nur fuer die Domain optikart.ch verwendet werden.
	Jegliche Modifikation ist verboten.
*/

opLastTop='';function opStart(){var s='document.top'+opAktThema1+'.src="/g/nav/top/a/'+opAktThema1+'.gif"';eval(s);if(opAktThema2!=''){opMarkEgoStyle("color:#D10019");}}function opMausOverTop(t){if(t==opAktThema1)return;var s='document.top'+t+'.src="/g/nav/top/o/'+t+'.gif"';eval(s);opLastTop=t;}
function opMausOutTop(){if(opLastTop=='')return;if(opLastTop==opAktThema1)return;var s='document.top'+opLastTop+'.src="/g/nav/top/i/'+opLastTop+'.gif"';eval(s);opLastTop='';}
function opEchoCSSfix(){document.write ('<link href="/g/css/extra.css.php?b='+opWW()+'&h='+opWH()+'" rel="stylesheet" type="text/css" media="screen" />');}
function opMarkEgoStyle(style) { //V 1.2 (C) 2009 opuskula.ch
var as=document.getElementsByTagName("a");var selbst=document.location; var i,ziel;if(navigator.appName=="Microsoft Internet Explorer"){var ie=parseFloat(navigator.appVersion);if(ie=4){var pos=navigator.appVersion.indexOf("MSIE ");ie=parseFloat(navigator.appVersion.substr(pos+5, 3));}}for(i=0;i<as.length;i++){ziel=as[i].getAttribute('href');if(navigator.appName=="Microsoft Internet Explorer"&&ie<=7){if(selbst==ziel){as[i].innerHTML="<span style="+style+">"+as[i].innerHTML+"</span>";}}else{if(selbst==opRel2Abs(ziel)){as[i].setAttribute('style',style);}}}}
function opRel2Abs(rel) { //V 1.1 (C) 2008 opuskula.ch
var selbst=document.location+"";var aSelbst,aRel;var muster=/^http[s]?.\/\//i;if(muster.test(rel)==true){return(rel);}aSelbst=selbst.split('/');aSelbst.pop();if(rel==null||typeof rel=='undefined')rel='';aRel=rel.split('/');if(aRel[0]=='')return(aSelbst.join('/')+'/'+rel);for(var i=0;i<aRel.length;i++){switch(aRel[i]){case '.':break;case '..':aSelbst.pop();break;default: aSelbst.push(aRel[i]);}}return aSelbst.join('/');}
function opWW(){if(window.innerWidth){return window.innerWidth;}else if(document.body&&document.body.offsetWidth){return document.documentElement.offsetWidth;}else{return document.documentElement.offsetWidth;}}
function opWH(){if(window.innerHeight){return window.innerHeight;}else if(document.body&&document.body.offsetHeight){return document.documentElement.offsetHeight;}else{return document.documentElement.offsetHeight;}}

