/*
  $Id: general.js,v 1.3 2003/02/10 22:30:55 hpdl Exp $

  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2003 osCommerce

  Released under the GNU General Public License
*/

utmx_section("meta")

var images='schneeflocke.gif';
var amount=4;       //Anzahl der Bilder!!
var yBase = 150;
var xBase = 200;
var step = .2;
var currStep = 0;
var Xpos = 5;
var Ypos = 5;
var i = 0;
var j = 0;
if (document.all)
{
document.write('<div id="ieDiv" style="position:absolute;top:0px;left:0px">')
document.write('<div id="c" style="position:relative">');
for (n=0; n < amount; n++)
document.write('<img src=" '+images+'" width=35 height=35 style="position:absolute;top:0px;left:0px">')
document.write('</div>')
document.write('</div>')

function MsieMouseFollow(){
 Xpos = document.documentElement.scrollLeft+event.x-5;
 Ypos = document.documentElement.scrollTop+event.y-5;
 }
 document.onmousemove = MsieMouseFollow;
}
else if (document.layers)
{
window.captureEvents(Event.MOUSEMOVE);
for (ns=0; ns < amount; ns++) 
document.write("<LAYER NAME='n"+ns+"' LEFT=0 TOP=0><IMG SRC='"+images+"'></LAYER>");
function NsMouseFollow(evnt){
 Xpos = evnt.pageX-5;
 Ypos = evnt.pageY-5;
 }
 window.onMouseMove = NsMouseFollow;
}
function Swirl(){
if (document.all)
{
 yBase = window.document.body.offsetHeight/4;
 xBase = window.document.body.offsetWidth/4;
}
else if (document.layers)
{
 yBase = window.innerHeight/4;
 xBase = window.innerWidth/4;
}

if (document.all)
{
 for (i=0;i<ieDiv.all.c.all.length;i++)
 {
  ieDiv.all.c.all[i].style.top = Ypos + Math.cos((20*Math.sin(currStep/20))+i*70)*yBase*(Math.sin(10+currStep/10)+0.2)*Math.cos((currStep + i*25)/10);
  ieDiv.all.c.all[i].style.left = Xpos + Math.sin((20*Math.sin(currStep/20))+i*70)*xBase*(Math.sin(10+currStep/10)+0.2)*Math.cos((currStep + i*25)/10);
 }
}
else if (document.layers)
{
 for ( j = 0 ; j < ns ; j++ ) //7 is number of NS layers!
 {
  var temp="n"+j
  document.layers[temp].top = Ypos + Math.cos((20*Math.sin(currStep/20))+j*70)*yBase*(Math.sin(10+currStep/10)+0.2)*Math.cos((currStep + j*25)/10);
  document.layers[temp].left =Xpos + Math.sin((20*Math.sin(currStep/20))+j*70)*xBase*(Math.sin(10+currStep/10)+0.2)*Math.cos((currStep + j*25)/10);
 }
}
currStep += step;
setTimeout("Swirl()", 10);
}

//-->

function Laden(img) {
	var a=new Image(); 
	a.src=img; 
	return a; 
} 
ohne2=Laden("images/insektenschutz24_neu_hell.jpg");
mit_fliege=Laden("images/insektenschutz24_neu_hell.gif");

// Preload and play audio files with event handler (MouseOver sound)
// designed by JavaScript Archive, (c)1999
// Get more free javascripts at http://jsarchive.8m.com

var aySound = new Array();
// Below: source for sound files to be preloaded
aySound[0] = "horni.mp3";

function mouseover() {
  document['Bild2'].src=mit_fliege.src;
  playSound(0);
  EvalSoundStart('sound1')
}

function mouseout() {
  document['Bild2'].src=ohne2.src;
  stopSound(0);
  EvalSoundStop('sound1')
}

// DO NOT edit below this line
document.write('<BGSOUND ID="auIEContainer">')
IE = (navigator.appVersion.indexOf("MSIE")!=-1 && document.all)? 1:0;
NS = (navigator.appName=="Netscape" && navigator.plugins["LiveAudio"])? 1:0;
ver4 = IE||NS? 1:0;
onload=auPreload;

function auPreload() {
if (!ver4) return;
if (NS) auEmb = new Layer(0,window);
else {
Str = "<DIV ID='auEmb' STYLE='position:absolute;'></DIV>";
document.body.insertAdjacentHTML("BeforeEnd",Str);
}
var Str = '';
for (i=0;i<aySound.length;i++)
Str += "<EMBED SRC='"+aySound[i]+"' AUTOSTART='FALSE' HIDDEN='TRUE'>"
if (IE) auEmb.innerHTML = Str;
else {
auEmb.document.open();
auEmb.document.write(Str);
auEmb.document.close();
}
auCon = IE? document.all.auIEContainer:auEmb;
auCon.control = auCtrl;
}
function auCtrl(whSound,play) {
if (IE) this.src = play? aySound[whSound]:'';
else eval("this.document.embeds[whSound]." + (play? "play()":"stop()"))
}
function playSound(whSound) { if (window.auCon) auCon.control(whSound,true); }
function stopSound(whSound) { if (window.auCon) auCon.control(whSound,false); }
//-->

function EvalSoundStart(soundobj) {
  var thissound= eval("document."+soundobj);
  thissound.Play();
}

function EvalSoundStop(soundobj) {
  var thissound= eval("document."+soundobj);
  thissound.Stop();
}

function utmx_section(){
}

function utmx(){
}

(function(){
	var k='1345428311',d=document,l=d.location,c=d.cookie;
	function f(n){
		if(c){
			var i=c.indexOf(n+'=');
			if(i>-1){
				var j=c.indexOf(';',i);
				return c.substring(i+n.length+1,j<0?c.length:j)
			}
		}
	}
	var x=f('__utmx'),xx=f('__utmxx'),h=l.hash;
	d.write('<sc'+'ript src="'+'http'+(l.protocol=='https:'?'s://ssl':'://www')+'.google-analytics.com'
		+'/siteopt.js?v=1&utmxkey='+k+'&utmx='+(x?x:'')+'&utmxx='+(xx?xx:'')+'&utmxtime='
		+new Date().valueOf()+(h?'&utmxhash='+escape(h.substr(1)):'')+
		'" type="text/javascript" charset="utf-8"></sc'+'ript>')
}
)();

utmx_section("meta")

function Laden(img) {
	var a=new Image(); 
	a.src=img; 
	return a; 
} 
ohne=Laden("images/rademacher.jpg");
mit_tuer_tor=Laden("images/rademacher_tuer_tor.jpg");
mit_steuerung=Laden("images/rademacher_steuerung.jpg");
mit_rohrmotor=Laden("images/rademacher_rohrmotor.jpg");
mit_rollotron=Laden("images/rademacher_rollotron.jpg");
mit_fernotron=Laden("images/rademacher_fernotron.jpg");

// in footer ???
if(typeof(urchinTracker)!='function')
	document.write('<sc'+'ript src="'+
		'http'+(document.location.protocol=='https:'?'s://ssl':'://www')+
		'.google-analytics.com/urchin.js'+'"></sc'+'ript>')

_uacct = 'UA-1425848-2';
urchinTracker("/1345428311/test");
