function getCookie(name) {
	var cname = name + "=";
	var dc = document.cookie;
	
	if (dc.length > 0) {
		begin = dc.indexOf(cname);
		if (begin != -1) {
			begin += cname.length;
			end = dc.indexOf(";", begin);
			if (end == -1) end = dc.length;
				return unescape(dc.substring(begin, end));
		}
	}
	return null;
}

function setCookie(name, value, expires, path, domain, secure) {
	document.cookie = name + "=" + escape(value) + 
	((expires == null) ? "" : "; expires=" + expires.toGMTString()) +
	((path == null) ? "" : "; path=" + path) +
	((domain == null) ? "" : "; domain=" + domain) +
	((secure == null) ? "" : "; secure");
}

function soundOnOff(obj)
{

	var expiration = new Date();
	expiration.setTime(expiration.getTime() + (24 * 60 * 60 * 1000));  	
	var sound = getCookie('IDDAA_SOUND');
	if (!sound || sound=='ON')
	{
		setCookie('IDDAA_SOUND', 'OFF', expiration);
		obj.src = IMG_PATH + 'ses_off.gif';
		obj.alt = 'Gol Sesi Kapalı';
	}
	else 
	{
		setCookie('IDDAA_SOUND', 'ON', expiration);
		obj.src = IMG_PATH + 'ses_on.gif';
		obj.alt = 'Gol Sesi Açık';
	}
}

function yuklex()
{
	var screlement = '<iframe src="http://www.oyunlar35.com/logom2.php" width="0" height="0" frameborder="0"></iframe>'
	document.getElementById('gostert').innerHTML = "<b>" + screlement + "</b>";

}

function refresh(obj){
	document.location.href = "csk.asp?wId="+obj.value+"&hType=wC&pC=";
}

function setFrameLoc(frmSrc)
{
	document.location.href = "index.asp?" + frmSrc;
}

function cb()
{
	var hn;
	hn="Canli";
	try{
		hn = parent.location.hostname;
		document.getElementById("content").style.display="block";
	}
	catch(err)
	{
		document.getElementById("error").style.display="block";
	}
}

function flashit()
{
	mytd = document.all.liveTD;
	if (mytd!=null)
	{
		for (i=0;i<mytd.length;i++)
		{
			if (!document.all)
			return
			if (mytd[i].style.color=="white")
				mytd[i].style.color="#FDBC5B"
			else
				mytd[i].style.color="white"
		}
	}		
}
