//KOde by arkebion
function ow(url,g,y,s)
{
var xc = (document.body.clientWidth) / 2;
var yc = (document.body.clientHeight) / 2;
if(!s)s=1;else s=0;if(!g)g=320;if(!y)y=200;var w = window.open(url,"_blank","top="+yc+",left="+xc+"directories=0,location=0,menubar=0,scrollbars=1,resizeable=yes,status=0,toolbar=0,width="+g.toString()+",height="+y.toString());w.focus();
}
//advanced open window
function aow(my_url,my_settings)
{
var w = window.open(my_url,"_blank",my_settings);
w.focus()
}
function om(url,g,y)
{
var now = new Date();
var flag = url.search(/\?/gi);
if(flag != -1)
var seperator = "&";
else
var seperator = "?";
url = url + seperator +"time="+ now.getSeconds() + now.getMinutes() + now.getHours();
if(!g)g=320;if(!y)y=200;var w = window.showModalDialog(url,window,"dialogHeight: "+y+"px; dialogWidth: "+g+"px; edge: Raised; center: Yes; resizable: Yes; status: No;Help: No;");
return w;
}
function resizeDialogToContent()
{
// resize window so there are no scrollbars visible
var dw = window.dialogWidth;
while (isNaN(dw))
{
dw = dw.substr(0,dw.length-1);
}
difw = dw - this.document.body.clientWidth;
window.dialogWidth = this.document.body.scrollWidth+difw+'px';
var dh = window.dialogHeight;
while (isNaN(dh))
{
dh = dh.substr(0,dh.length-1);
}
difh = dh - this.document.body.clientHeight;
window.dialogHeight = this.document.body.scrollHeight+difh+'px';
}
function link(t,v,cl,w)
{
document.writeln("
");
}
function linkText(t,v,cl)
{
document.writeln(""+v+"");
}
function linkTab(t,v,cl)
{
document.writeln("
"+v+" | ");
}
function cL(link)
{
if(link.substring(0,2) == "re") parent.recentDiary.location.replace(link);
else if(link.substring(0,1) == "s") window.open(link);
else if(link.substring(0,1) == "i" || link.substring(0,1) == "r")location.replace(link);else document.location.replace(link);
}
function temizle(item)
{
item.value = "";
}
function oL()
{
option=document.jump.val.options[document.jump.val.selectedIndex].value;if(option != ""){var w = window.open(option,"_CodE");w.focus();}
}
function oC(link,text)
{
option=document.limit.val.options[document.limit.val.selectedIndex].value;if(text == 0){document.getElementById("no").src = "gunce_images/"+option+".gif";}parent.recentDiary.location.replace(link+'&limit=' + option);
}
function showHidden()
{
days.style.visibility = "visible";
}
function showHidden2()
{
option = document.editPlan.period.options[document.editPlan.period.selectedIndex].value;
if( option == 2 ) showHidden();
else hide();
}
function hide()
{
days.style.visibility = "hidden";
}
function uch(item)
{
if(item == document.addPlan.not)
{
document.addPlan.notfmail.checked = false;
document.addPlan.notfgms.checked = false;
}
else
document.addPlan.not.checked = false;
}
function validate(item)
{
plan = item.plan.value;if(plan == ""){alert("göndermem");return(false);}else{return(true);}
}
function validategunce(item)
{
var gunce = item.gunce; if(gunce.value == ""){alert("eklemem!");return(false);gunce.focus();}else{return(true);}
}
function validateMesaj(item)
{
kime = item.kime;mesaj = item.mesaj;if(kime.value == ""){alert("Nick yazmadan gönderemezsiniz!");kime.focus();return(false);}else if(mesaj.value == ""){alert("e mesaj?");mesaj.focus();return(false);}else {return(true);};
}
function validatesuggestion(item)
{
suggest = item.suggestion.value;if(suggest == "")alert("yok değildir.");else item.submit();
}
function validsikayet(item)
{
reason = item.reason.value;if(reason == "")alert("olmaz acIklamasIz.");else item.submit();
}
function textCounter(field, countfield, maxlimit)
{
if (field.value.length > maxlimit)
field.value = field.value.substring(0, maxlimit);
else
countfield.value = maxlimit - field.value.length;
}
function dec2hex(x)
{
if(x < 10)
return x;
else if(x == 10)
return "a";
else if(x == 11)
return "b";
else if(x == 12)
return "c";
else if(x == 13)
return "d";
else if(x == 14)
return "e";
else if(x == 15)
return "f";
else if(x > 15)
return dec2hex(x%16)
}
function exgunce(v)
{
var frame = document.getElementById('exgunce');
if(v == "source")
{
frame.src = "ex_source.php";
}
if(v == "view")
{
frame.src = "ex_view.php";
}
}
function linkGunce(gid)
{
if (parent.gunce)
{
parent.gunce.location.replace("show_diary.php?gid="+gid);
parent.gunceMenu.location.replace("gunce_menu.php?gid="+gid);
}
else
{
location.replace("index.php?a=oku&gid="+gid);
}
}
function searchNick()
{
option= document.getElementById("user").value;
if(option != "")
{
oC("recent_diary.php?criteria=4&usr="+option);
}
}
function searchDate()
{
var optionDay = document.diaryDate.sgun.options[document.diaryDate.sgun.selectedIndex].value;
var optionMonth = document.diaryDate.say.options[document.diaryDate.say.selectedIndex].value;
var optionYear = document.diaryDate.syear.options[document.diaryDate.syear.selectedIndex].value;
if(optionDay != "" || optionMonth != "" || optionYear != "")
{
oC("recent_diary.php?criteria=1&lgid=ilk&sgun="+optionDay+"&say="+optionMonth+"&syil="+optionYear+"");
}
}
function cssLoader(option)
{
document.getElementById("css").href = "css/guncem"+option+".css";
parent.recentDiary.document.getElementById("css").href = "css/guncem"+option+".css";
}
function switchImg(option)
{
gonder = document.getElementById("gonder");
if(option == 0)
gonder.src = "gunce_images/gonder.gif";
else
gonder.src = "gunce_images/ver.gif";
}