//<a href='#' onClick="checkAll(document.myform.list)">CheckAll</a> / 
function checkAll(field) {
	for (var i = 0; i < field.length; i++) {
		field[i].checked = true;
	}
}

//<a href='#' onClick="uncheckAll(document.myform.list)">UnCheckAll</a>
function uncheckAll(field) {
	for (var i = 0; i < field.length; i++) {
		field[i].checked = false;
	}
}

function random_number(aralik) {
	var a = Math.round(Math.random()*aralik);   
	return a;
}

function query_string () {
    var params = new Object();
    var query = location.search.substring(1);     
    var pairs = query.split(";" || "&");          
    for(var i = 0; i < pairs.length; i++) {
        var pos = pairs[i].indexOf('=');          
        if (pos == -1) continue;                  
        var argname = pairs[i].substring(0,pos);  
        var value = pairs[i].substring(pos+1);    
        value = decodeURIComponent(value);        
        params[argname] = value;                  
    }
    return params;                                
}

function urun_tavsiye(uid) {
	var newWin=window.open('index.pl?mod=shop&op=tavsiye_et&popup=1&id='+uid,'Ürün Tavsiye Et!','scrollbars=no,menubar=no,height=320,width=480,resizable=yes,toolbar=no,location=no,status=no');
	return true;
}

function add_favorite(uid) {
	var newWin=window.open('index.pl?mod=shop&op=list_proces2&popup=1&uid='+uid,'Favori Listeme Ekle','scrollbars=no,menubar=no,height=400,width=600,resizable=yes,toolbar=no,location=no,status=no');
	return true;
}

function paylas(path){
	var newWin=window.open('http://' + path);
	return true;
}

function hizli_ara (type) {
	var find = prompt("Lütfen Aradığınız İsmi Giriniz!");
	if(find) {
		var surl = "index.pl?mod=shop&op=search_dev&content="+type+"&find="+find;
		var action = open_url("govde", surl);
		//if(action == true) { location.href=surl; }
		return false;
	}
}

function get_all_links () {
    //for (i = 0; i < document.links.length; i++) {
	//	document.links[i].href += "#";
		//document.links[i].onclick = open_link;
    //}
	return true;
}

function open_link () {
	return open_url('govde',this.href);
}
/*
function get_all_links () {
	var links = document.getElementsByTagName('a');
    for (i = 0; i < links.length; i++) {
		//document.links[i].onclick = "return open_url('"+document.links[i].href+"','govde')";
		//document.links[i].href = "#";
		//document.links[i].href = golink;
		if (links[i].addEventListener) {  
			links[i].addEventListener("click", open_link, false);
		} else if (links[i].attachEvent) {  
			links[i].attachEvent("onclick", open_link);
		} else if (links[i].onclick) {
			links[i].onclick=open_link;
		}
    }
	return true;
}
*/
//open_url(this.href,"govde")'
//document.links[i].disabled = true;


