window.name = 'dws_body';
/***********************/
function JS_RowClick(CheckBoxObj) {
//var row = MM_findObj('row_'+rowID);
var row = CheckBoxObj.parentElement.parentElement
if (CheckBoxObj.checked == true) {row.className = 'ThemeCell1';}
	else {row.className = 'ThemeCell2';}
}
/***********************/
function JS_Confirm(Link, Mesaj){
	if (!Mesaj) {Mesaj = 'Bu işlemi yapmak istediğinizden emin misiniz ?';}
	var Dogrulandimi = confirm(Mesaj);
	if (Dogrulandimi) {Link.href += '&confirmed=true';}
	return Dogrulandimi;
	}
/***********************/
function JS_ShowHideLayerCont(obj,action_get) { 
var Obj = MM_findObj(obj);
if (action_get == undefined) {
	action_get = (Obj.style.display == 'none') ? 'block' : 'none';
	}
Obj.style.display = action_get;

}
/***********************/
function JS_CopyClipboard(obj){
var obj = MM_findObj(obj);
var otyp = obj.type;
var oval;
if (otyp == "input"
	|| otyp == "select"
	|| otyp == "option"
	|| otyp == "textarea") {
	oval = obj.value;
	}
	else {
	oval = obj.innerHTML;
	} // end else
if (obj) {
	if (window.clipboardData) {// for ie
		window.clipboardData.setData('Text', oval);
		} // end if
		else { //for gecko
		alert("Bu özellik sadece Internet Explorer kullanıcıları için aktiftir!");
		//oval.execCommand('Copy');
		} // end else
	} // end if
}
/***********************/
function PrintPage() {
if (typeof(window.print) != 'undefined') {
	window.print();
	//document.execCommand('Print');
	}
}
/***********************/
function JS_ReplaceAll(str,searchfor,replacewith) {

	var first	= str.indexOf(searchfor);
	var last	= str.lastIndexOf(searchfor);
	var strLen	= str.length;
	if (first > -1){
		str = str.replace(searchfor,replacewith);
		}
	if (last != first){
		var firspart = str.substring(0,first);
		var otherPart = str.substring(first,strLen);
		var isMoreOne = otherPart.indexOf(searchfor);
		if (isMoreOne > -1){
			str = firspart + JS_ReplaceAll(otherPart,searchfor,replacewith);
			}
		}
	return str;
}
/***********************/
// Example:
// alert( readCookie("myCookie") );
function JS_readCookie(name) {
	var cookieValue = "";
	var search = name + "=";
	if(document.cookie.length > 0) { 
		offset = document.cookie.indexOf(search);
		if (offset != -1) {
			offset += search.length;
			end = document.cookie.indexOf(";", offset);
			if (end == -1) end = document.cookie.length;
			cookieValue = unescape(document.cookie.substring(offset, end))
			}
	}
return cookieValue;
}
/***********************/
// Example:
// writeCookie("myCookie", "my name", 24);
// Stores the string "my name" in the cookie "myCookie" which expires after 24 hours.
function JS_writeCookie(name, value, hours) {
	var expire = "";
	if(hours != null) {
		expire = new Date((new Date()).getTime() + hours * 3600000);
		expire = "; expires=" + expire.toGMTString();
		}
	document.cookie = name + "=" + escape(value) + expire;
}
/***********************/



