// Show/Hide text in search input

function switchText(object, baseText, eventName)
	{
		if (eventName == "blur")
		{
		if (object.value == "")
		{
		object.value = baseText;
		}
		}
		else
		{
		if (object.value == baseText)
		{
		object.value = "";
		}
	}
}





// Show/Hide div on mouseclick
function ShowDiv(obj){
	if(document.getElementById){
	var el = document.getElementById(obj);
		if(el.style.display != "block"){
			el.style.display = "block";
		}else{
			el.style.display = "none";
		}
	}
}




// Saati
var dt = new Date();
var curSecond = dt.getSeconds();
var curMinute = dt.getMinutes();
var curHour = dt.getHours();
var curDay = dt.getDay();

function tiktik() {

    curSecond += 1;
    if (curSecond == 60) {
        curSecond = 0;
        curMinute += 1;
    }
    if (curMinute == 60) {
        curMinute = 0;
        curHour += 1;
    }
    if (curHour == 24) curHour = 00;
    sec = (curSecond < 10 ? '0' : '') + curSecond;
    minute = (curMinute < 10 ? '0' : '') + curMinute;
    hour = (curHour < 10 ? '0' : '') + curHour;
    day = (curDay < 10 ? '0' : '') + curDay;
    document.getElementById('clock').innerHTML = hour + ':' + minute + ':' + sec;
}




// Popup Windows
function popitup(url) {
    newwindow = window.open(url, 'name', 'height=550,width=650,left=350,top=200');
    if (window.focus) { newwindow.focus() }
    return false;
}

function popitup_tow(url) {
    newwindow = window.open(url, 'name', 'height=600,width=800,left=250,top=130,status=0,toolbar=0,scrollbars=1');
    if (window.focus) { newwindow.focus() }
    return false;
}


function change(obj) {

    document.getElementById("BigImg").src = 'NewsImg.aspx?NID=' + Request.QueryString("Location") + '&w=340&h=259&p=' + obj.alt;

}
