var alertTimerId  = 0;

function showhide(did, act){
	if(act=="show"){
		$('sdarot_bath').style.display = 'none';
		$('sdarot_kitchen').style.display = 'none';
		//$('sdarot_accessories').style.display = 'none';
		$(did).style.display = '';
	}else{
		$(did).style.display = 'none';
	}
} 

whos_open = 0
function showhide2(did){
	if(whos_open!=did){
		if($(did).style.display == 'none'){
			Effect.BlindDown(did);
			if(whos_open != 0){
				Effect.BlindUp(whos_open);
			}
			whos_open = did;
		}else{
			Effect.BlindUp(did);
		}
	}
} 

function colorize(id, act){
	if(act=="on"){
		$(id).style.borderColor = "#000000";
	}else{
		$(id).style.borderColor = "#d3d8dc";
	}
}

function gup( name ){  name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");  var regexS = "[\\?&]"+name+"=([^&#]*)";  var regex = new RegExp( regexS );  var results = regex.exec( window.location.href );  if( results == null )    return "";  else    return results[1];
}
	
sketch_file = '';
sketch_makat = '';
sketch_title = '';
function showItem(title, pic, makat, sketch, subname){
	switch(gup('id')){
		case "bath":
			$('sp_cat').innerHTML = "<img src='images/sp_bath.png' width='248' height='350' border='0'>";
			break;
		case "kitchen":
			$('sp_cat').innerHTML = "<img src='images/sp_kitchen.png' width='248' height='350' border='0'>";
			break;
		case "sdarot":
			$('sp_cat').innerHTML = "<img src='images/sp_bath.png' width='248' height='350' border='0'>";
			break;
	}
	$('item_info_title').innerHTML = "דגם " + makat;
	$('item_info_text').innerHTML = title;
	$('item_sidra').innerHTML = subname;
	$('item_info_pic_src').innerHTML = "<table width='380' height='350' border='0' cellspacing='0' cellpadding='0'><tr><td align='center' valign='middle'><img src='pics/t_350_"+pic+"' alt='"+title+"' title='"+title+"'></td></tr></table>";
	if(sketch!=""){
		$('item_info_sketch').style.display = '';
		sketch_file = sketch;
		sketch_makat = makat;
		sketch_title = title;
	}else{
		$('item_info_sketch').style.display = 'none';
		sketch_file = '';
	}
	$('item_info').style.display = '';
}

function showSK(){
	win = window.open("showSK.asp?makat="+sketch_makat+"&pic="+sketch_file+"&title="+sketch_title, "picshow","width=600"+",height=600"+",toolbar=0,location=0,directories=0,status=No,menubar=0,scrollbars=1,resizable=1,copyhistory=0,");
			win.focus();
}

function chkSearch(){
	if($('txtSearch').value.length>2 && $('txtSearch').value !="חיפוש"){
		return true;
	}else{
		return false;
	}
}
