var t; // for timer
var b=1;

function mto(subject){
var sat = "@";
var	s = "i" + "nf" + "o";
	s = s + sat;
	s = s + "watchingwindows.c" + "o.u" + "k";
	location.replace("ma" + "il" + "to" + ":" + s + "?subject=" + subject);
}


function ChangeBanner() {
        var rate=4000;
	clearTimeout(t);
        if (b == 6) b = 1;
	if (b == 5) {
            $('#banner2').fadeOut(4000);
        }
	if (b == 4) {
         $('#i1').fadeOut(200);
         $('#i2').fadeOut(200);
         $('#i3').fadeOut(200);
         $('#banner2').fadeIn(4000);
         rate = 15000;
        } else {
         $('#i'+b).fadeIn(4000);
        } 
        ++b;
	t=setTimeout("ChangeBanner()",rate);
}


GetWindowDims(600, 800);



function GetWindowDims(h,w) {
 if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
  mt = parseInt((myHeight - h) / 2);
  lm = parseInt((myWidth - w) / 2); //+ parseInt(w /5) + (isIE ? 0 : 10);
}

function d(s) {
	document.write(s);
}

function SetStyle(id,item,value) {
	var target = eval('document.getElementById("'+id+'").style.'+item)
	target = '"'+value+'"';
}

function SetTopLeft(id,t,l) {
	document.getElementById(id).style.top=t+'px';
	document.getElementById(id).style.left=l+'px';
}

function ReSize() {
	var x;
	
	GetWindowDims(600,800);
	mt = 0;
	SetTopLeft('banner',mt,lm+200);
	SetTopLeft('maindiv',mt+140,lm);
	SetStyle('maindiv','height',(myHeight-mt-140)+'px');	
	SetTopLeft('logo',mt,lm);
	//try {SetTopLeft('panel1',mt+130,lm);} catch (err) {	}
	//try {SetTopLeft('panel2',mt+130,lm);} catch (err) { }
	SetTopLeft('menu',mt+90,lm);
}

function SetSrc(id,pic) {
		document.getElementById(id).src = 'images/'+pic;
}


