function changeText(el,text) {
	//alert(el.firstChild.nodeValue);
  //if (IsIE && IE_Ver<7) el.innerText=text;
	//else {
		if (el.firstChild) el.firstChild.nodeValue=text;
		else el.appendChild(document.createTextNode(text));
	//}
}


function show_img(width,height,s_url){
	var imgnwin=window.open(s_url,"imgswin","resizable=yes,scrollbars=yes,toolbar=yes,location=no,directoties=no,status=no,menubar=no,width="+width+",height="+height);
}

function show_bask(width,height,s_url){
	var p_top=(window.screen.height-height)/2, p_left=(window.screen.width-width)/2;
	var baskwin=window.open(s_url,"imgswin","resizable=yes,scrollbars=yes,toolbar=no,location=no,directoties=no,status=no,menubar=no,width="+width+",height="+height+",top="+p_top+",left="+p_left);
	baskwin.focus();
}

function active_win(surl){
	window.opener.document.location=surl;
}

function show_win(width,height,s_url){
	var p_top=(window.screen.height-height)/2, p_left=(window.screen.width-width)/2;
	var imgnwin=window.open(s_url,"imgswin","resizable=yes,scrollbars=no,toolbar=no,location=no,directoties=no,status=no,menubar=no,width="+width+",height="+height+",top="+p_top+",left="+p_left);
	imgnwin.focus();
}

function show_winpos(width,height,s_url){
	var p_top=(window.screen.height-height)/2, p_left=(window.screen.width-width)/2;
	var imgnwin=window.open(s_url,"imgswin","resizable=yes,scrollbars=yes,toolbar=no,location=no,directoties=no,status=no,menubar=no,width="+width+",height="+height+",top="+p_top+",left="+p_left);
	imgnwin.focus();
}

function show_winATTR(width,height,s_url, ATTR){
	var p_top=(window.screen.height-height)/2, p_left=(window.screen.width-width)/2;
	var imgnwin=window.open(s_url,"imgswin",ATTR+"width="+width+",height="+height+",top="+p_top+",left="+p_left);
	imgnwin.focus();
}

function ok(xxHREF)
{
	xxWindow = window.open(xxHREF,"BaseWindow","toolbar=no,menubar=no,status=no,directories=no,resizable=no,scrollbars=yes,top=20,left=40,width=580,height=580");
	if (xxWindow!=null) xxWindow.focus();
}


function normalize(price)
{	var pr, str;
	pr=parseInt(Math.round(price*100));
	str = new String(pr);
	pr="";
	if (str.length>2)
		pr += str.substring(0, str.length-2);
	else
		pr += "0";
	pr += ".";
	if (str.length>2)
		pr += str.substring(str.length-2, str.length);
	else
	{	if (str.length==1)
			pr += "0";
		pr += str;
	}
	return pr;
}

function show_div(id_cur){
	var div_set=null;
	div_set=document.getElementById(id_cur);
	if (div_set!=null) {
		if (div_set.style.display=="block") div_set.style.display="none";
		else div_set.style.display="block";
	}
}

function show_div2(id_cur){
	var div_set=null;
	div_set=document.getElementById(id_cur);
	if (div_set!=null) 
		div_set.style.display="none";
}

function show_divMode(id_cur, Mode){
	var div_set=document.getElementById(id_cur);
	if (div_set!=null) 
		div_set.style.display=Mode;
}

function set_radio(p,v){
	if (p==null) return;
	for (i=0; i < p.length; i++) {
		if (p[i].value==v) { p[i].checked=true; break; }
	}
}

function get_radio(p){
var res="";
	if (p==null) return;
	for (i=0; i < p.length; i++) {
		if (p[i].checked) { res=p[i].value; break; }
	}
	return res;
}

function reset_radio(p){
	if (p==null) return;
	for (i=0; i < p.length; i++) {
		p[i].checked=false;
	}
}

