if (getCookie('egepentema') != null){setCSS(getCookie('egepentema'))}

function newwind2(url,w,h,ad){
	if(!w)w=650;
	if(!h)h=500;
	if(!ad)ad='yenipenc';
	window.open(url,ad,'menubar=no,location=no,resizable=yes,scrollbars=yes,status=no,top=50,left=100,width='+w+',height='+h);
}

function boyutlandir(x,y,xx,yy){
	if(xx==null)xx=300;
	if(yy==null)yy=500;
	if(x<xx)var x=xx;
	resizeTo(x+80,y+110);
}


function setCookie(name,value,days) {
	if (days) {
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
}

function getCookie(name) {
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}

function delCookie(name) {
	createCookie(name,"",-1);
}

function setCSS(i) {
	setCookie('egepentema',i,999);
	cssdosyasi='/cssjs/ege'+i+'.css';
	if (navigator.appName == 'Microsoft Internet Explorer'){
		//IE 6 ve 7 var olan bir linkin ozelligini 2. kere degistirince cokuyor!
		// o yuzden her seferinde yeni bir link nesnesi yaratiyoruz.
		var r=document.createElement('link');
		r.setAttribute('rel','stylesheet');
		r.setAttribute('type','text/css');
		r.setAttribute('href',cssdosyasi);
		var hd=document.getElementsByTagName('head')[0];
		hd.appendChild(r);
	}
	else { document.getElementById('sitil').setAttribute('href', cssdosyasi); }
}




/*
	Compatibile XHTML Flash displayer
	Author 	: Razvan Stanga
	Website : http://www.phprebel.org/
*/

function Flash () {
	this._swf = '';
	this._width = 0;
	this._height = 0;
	this._params = new Array();
}

Flash.prototype.setSWF = function (_swf, _width, _height, _message) {
	this._swf 		= _swf;
	this._width 	= _width;
	this._height 	= _height;
	this._message 	= _message;
}

Flash.prototype.setParam = function (paramName, paramValue) {
	this._params[this._params.length] = paramName+'|||'+paramValue;
}

Flash.prototype.display = function () {
	var _txt 	= '';
	var params = '';
	_txt += '<object>\n';
	_txt += '<param width="'+this._width+'" height="'+this._height+'" name="movie" value="'+this._swf+'" />'
	_txt += '<param name="quality" value="high" />';
	for ( i=0;i<this._params.length;i++ ) {
		_param = this._params[i].split ('|||');
		_txt += '\t<param name="'+_param[0]+'" value="'+_param[1]+'" />';
		params += _param[0]+'="'+_param[1]+'"';
	}

	_txt += '<embed width="'+this._width+'" height="'+this._height+'" src="'+this._swf+'" '+params+' quality="high" type="application/x-shockwave-flash"></embed>';
	_txt += '</object>';
	document.write (_txt);
}

