// *** some core functions
// *** (c) feel by fish, http://www.imagen.pl
window.onerror=null;
function me(){
        parent.rysoj_prawa(parent.opendir)
        window.open("../head_me.html","pr_gora")}
function new_window(src,w,h) {
	window.open(src,"okno","toolbar=no,menubar=no,location=no,directories=no,top=100,left=100,status=no,scrollbars=no,resizable=yes,width="+w+",height="+h);
}


// --- e-dysk pictures
function writeimg(filename) {
	image = new Array();
	image[0] = new Array('adm',	'To my mamy się do Ciebie dostosować, a nie Ty do nas - zmień co tylko chcesz.',310,395,212,270);
	image[1] = new Array('demo', 'Sam zobacz jakie to proste. ZAPISZ SIĘ ! Wszystko za darmo!');
	image[2] = new Array('dlawzrok', 'Tu obok... po lewej są jeszcze inne moje zdjęcia.',385,435,385,435);
	image[3] = new Array('end', '... i jak było? - zostań z nami - powiedz znajomym o edysku.',283,395,283,395);
	image[4] = new Array('kontakt', 'Na Twoje pytania zawsze odpowiemy.',375,435,233,270);
	image[5] = new Array('pomoc', 'Pomożecie? Pomożemy!',334,400,209,250);
	image[6] = new Array('powinnym', 'Powiedz innym. Twoi znajomi długo będą Ci dziękować.',298,435,298,435);
	image[7] = new Array('reklama', 'Oczywiście do liczenia budżetów i wskaźników używamy innych urządzeni niż liczydła.',322,435,322,435);
	image[8] = new Array('remont', '',328,400,205,250);
	image[9] = new Array('start', 'ZAPISZ SIĘ ! -  zobaczysz że warto.',312,435,194,270);
	image[10] = new Array('startx', 'edysk.pl daje ci wolność - ty decydujesz gdzie trzymasz swoje pliki. Zobacz zostosowania edysk.pl.',216,435,216,435);
	image[11] = new Array('zapisz_sie', '... jeszcze jedno - wszystko dostajesz ZA DARMO! edysk.pl jest jedyny i darmowy !',341,435,212,270);
	image[12] = new Array('napisali', 'napisali o nas...',218,435,218,435);
	image[13] = new Array('1maj', 'edyskowicze wszystkich krajów łączcie się!',300,354,300,354);
	image[14] = new Array('zima', 'Na edysku Twoje pliki są bezpieczne przez cały rok',240,576,240,576);
	image[15] = new Array('zima2', 'edyskowicze wszystkich krajów łączcie się!',310,438,310,438);

	for (a=0;a<image.length;a++) {
		if (filename == image[a][0]) break;
	}

	if (GetCookie('sex')>0) filename=filename+'_f';	 else filename=filename+'_m';
	if (screen.width <= 800) {
		width=image[a][4];
		height=image[a][5];
		filename=filename+'1';
	} else {
		if (image[a]){width=image[a][2];
		height=image[a][3];
	}
	}
	if (image[a]){document.writeln ('<img src="gfx/color/foto/'+filename+'.jpg" width='+width+' height='+height+' alt="'+image[a][1]+'">')};
}


// --- menu functions
function MenuColor(fontover, fontout, backover, backout) {
	this.fontover = fontover;
	this.fontout = fontout;
	this.backover = backover;
	this.backout = backout;
}

MenuColors = new Array();
MenuColors[0] = new MenuColor("#000000", "#000000", "#eeeeee", "#ffffff");
MenuColors[1] = new MenuColor("#883300", "#000000", "#ffcc88", "#ff9900");
MenuColors[2] = new MenuColor("#ffffff", "#eeeeee", "#666666", "#000000");
MenuColors[3] = new MenuColor("#002149", "#000000", "#eeeeee", "#01C9CA");
MenuColors[4] = new MenuColor("#000000", "#000000", "#FFFFFF", "#ECECEC");


function setMenuColors() {
	if(document.all) {
		td_tags = document.all.tags("TD");
		for(var i=0; i<td_tags.length; i++)
			if(td_tags[i].className.match(/^menu\d$/) != null) {
				td_tags[i].onmouseover = td_over;
				td_tags[i].onmouseout = td_out;
				td_tags[i].onclick = td_click;
			}
		
		function td_over() {
			this.style.backgroundColor = MenuColors[this.className.substring(4)].backover;
			this.all.tags('A')[0].style.color=MenuColors[this.className.substring(4)].fontover;
			this.style.cursor = "hand";
		}
		function td_out() {
			this.style.backgroundColor = MenuColors[this.className.substring(4)].backout;
			this.all.tags('A')[0].style.color=MenuColors[this.className.substring(4)].fontout;
		}
		function td_click() {
			this.all.tags('A')[0].click();
		}
	}
}


// --- cookies
function GetCookie(name){
  var start = document.cookie.indexOf(name+"=");
  var len = start+name.length+1;
  if((!start) && (name != document.cookie.substring(0,name.length))) {
    return null;
  }
  if(start == -1){
    return null;
  }
  var end = document.cookie.indexOf(";",len);
  if(end == -1){
    end = document.cookie.length;
  }
  return unescape(document.cookie.substring(len,end));
}

