bV  = parseInt(navigator.appVersion)
bNS = navigator.appName=="Netscape"
bIE = navigator.appName=="Microsoft Internet Explorer"
DEBUGIT = false;

function isFunction(a) {
    return typeof a == 'function';
}
function isNull(a) {
    return typeof a == 'object' && !a;
}
function isNumber(a) {
    return typeof a == 'number' && isFinite(a);
}
function isObject(a) {
    return (a && typeof a == 'object') || isFunction(a);
}
function isString(a) {
    return typeof a == 'string';
}
function isUndefined(a) {
    return typeof a == 'undefined';
} 

    function SetCSS(title) {
       var i, a, main;
       for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
           if((a.getAttribute("rel").indexOf("style") != -1)&&(a.getAttribute("title"))){
               a.disabled = true;//vsechno implicitne vypinam
               if(a.getAttribute("title") == title)//pozadovany styl?
                    a.disabled = false; //opet zapnu
           }
       }
       newCookie('cssfile',title,24*7);
    }

    function newCookie(name,val,hours) {
       var date = new Date();
       date.setTime(date.getTime()+(hours*60*60*1000));
       var expires = "; expires="+date.toGMTString();
       document.cookie = name+"="+val+expires+"; path=/";       
    }
    
    function readCookie(name) {
       var nameEQ = name + "=";
       var ca = document.cookie.split(';');
       for(var i=0;i < ca.length;i++) {
           var c = ca[i];
           while (c.charAt(0)==' ') c = c.substring(1,c.length);
           if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
       }
       return null;
    }
    
    /********************/
        
    /*vratit pole z cookiny aname*/
    function CookieArrayGet(aname){
      var out = new Array();
      var s=readCookie(aname);
      if (s!=null){
		var x=s.split('^'); 
		for(var i=0; i<x.length; i++){
			y=x[i].split('~');
			out[y[0]]=y[1];
		}
	  }
      return out;
    }
    
    function CookieArraySet(aname,a){
      var s = '';
      for(var id in a){
        if (s!='') s=s+'^';
        s=s+id+'~'+a[id];
      }
      newCookie(aname,s,24*7*12);
    }
    
    /* cookiena aname obsahuje pole, ve ktere nastavit [x]=y */
    function CookieArrayStore(aname,Aid,Aval){
      if (Aid==null) return;
      var a=CookieArrayGet(aname);
	  a[Aid]=Aval;
	  CookieArraySet(aname,a);
    }
    
    /* z cookie pole precist hodnotu x a vratit*/
    function CookieArrayRead(aname,Aid){
      var a=CookieArrayGet(aname);
      for(var id in a)
		if (id==Aid)
		  return a[id];
    }


function parseURL(url){
	var i, pos, argname, value, queryString, pairs, out;
	queryString = url.substring(url.indexOf('?')+1);	
  pairs = queryString.split("&");
  out=new Object();
  for (i = 0; i < pairs.length; i++){
   pos = pairs[i].indexOf('=');
   if (pos == -1)
     continue;
   argname = pairs[i].substring(0,pos);
   value = pairs[i].substring(pos+1);
   out[argname]=value;
  }
  return out;
}

//decode pro RFC1738
function decodeURL(url){
  return unescape(url).replace(/&amp;/g,'&');
}

function getId(id){
    if (isObject(id)) return id;
    return document.getElementById(id);
}

function reloadnow(){
  var scrTop = document.body.scrollTop;//pozice scrollu
  var a=window.location.href;//
  var ind=a.lastIndexOf('&scrollto');//hledam, jestli uz parametr existuje
  if (ind>0)//jestli jo
    a=a.slice(0,ind);//tak ho vyseknu
  window.location.href=a+'&scrollto='+scrTop;
}

function pageLoaded(){
  var a=window.location.href;//pozice
  var ind=a.lastIndexOf('&scrollto');//najdu parametr
  var scrTop=a.slice(ind+10);//zjistim hodnotu (tenhle je vzdy posledni)
  if ( scrTop > 40)
    window.scrollTo(0,scrTop);
}

function add2basket(pid){
  p=document.getElementById('hm_'+pid);
  window.location.href='?page=basket&buypid='+pid+'&count='+p.value;
}

function SetVisibility(objid, boolstate){
  if (boolstate){
    s='visible';
  }else{
    s='hidden';
  }
  if (obj=getId(objid)) obj.style.visibility=s;
}
function GetVisibility(objid){
	if (!isObject(objid))
		objid=getId(objid);
	if (!objid) return false;
	if (objid.style.visibility=='hidden')	return false;
	return true;
}

function SetDisplaying(objid, boolstate){
  if (boolstate){
    s='';
  }else{
    s='none';
  }
  if (isObject(objid))
		objid.style.display=s;
  else
    if (obj=getId(objid)) obj.style.display=s;  
}

function GetDisplaying(objid){
  if (!isObject(objid))
		objid=getId(objid);
  if (objid)
    s=objid.style.display;
  else return false;
  //if (s=='none')
	if (s.indexOf('none')>=0)
      return false;  
  return true;
}

function ToogleDisplaying(objid){
  SetDisplaying(objid,!GetDisplaying(objid));
}

function ToogleVisibility(objid){
  SetVisibility(objid,!GetVisibility(objid));
}

function SetClass(objid,cl){
	if (isString(objid))
		objid=getId(objid);
  if (objid && objid.className!=cl)
    objid.className=cl;
}

function AddClass(obj,cl){
	if (isString(obj)) obj=getId(obj);
	if(!obj) return;
	var classes=parseClasses(obj.className);
	var outClass='';
	for(var i in classes){
		if(classes[i]!=cl) outClass=outClass+' '+classes[i];
	}
	obj.className=outClass+' '+cl;
}

function RemoveClass(obj,cl){
	if (isString(obj)) obj=getId(obj);
	if(!obj) return;
	var classes=parseClasses(obj.className);
	var outClass='';
	for(var i in classes){
		if(classes[i]!=cl) outClass=outClass+' '+classes[i];
	}
	obj.className = outClass;	
}



var actionsrc="";//vystavuji globalne, aby si ji selektory mohli snadno precist

function popupaction(actsrc){
  if (actsrc.lastIndexOf('javascript:')==0){//je to javascript
      eval(actsrc.slice(11));
  }else
    window.location.href="../index.php"+actsrc;
}

function CheckAll(checked){
    var col = document.getElementsByTagName("INPUT");
    for (var i=0;i<col.length;i++) {
  col[i].checked= checked;
    }
}
/*

Ways of calling the function now are:
To get all a elements in the document with a info-links class. 
<CODE>getElementsByClassName(document, "a", "info-links");</CODE> 
To get all div elements within the element named container, with a col and a left class. 
<CODE>getElementsByClassName(document.getElementById("container"), "div",["col", "left"]); </CODE>
*/

function getAllChildren(e) {
  // Returns all children of element. Workaround required for IE5/Windows. Ugh.
  return e.all ? e.all : e.getElementsByTagName('*');
} 

function getElementsByClassName(oElm, strTagName, oClassNames){
    if (oElm==null) oElm=document.body;

    var arrElements = (strTagName == "*" )? getAllChildren(oElm) : 
					  oElm.getElementsByTagName(strTagName);

    var arrReturnElements = new Array();
    var arrRegExpClassNames = new Array();
    if(typeof oClassNames == "object"){
        for(var i=0; i<oClassNames.length; i++){
            arrRegExpClassNames.push(new RegExp("(^|\\s)" + 
            oClassNames[i].replace(/\-/g, "\\-") + "(\\s|$)"));
        }
    }
    else{
        arrRegExpClassNames.push(new RegExp("(^|\\s)" + 
        oClassNames.replace(/\-/g, "\\-") + "(\\s|$)"));
    }
    var oElement;
    var bMatchesAll;
    for(var j=0; j<arrElements.length; j++){
        oElement = arrElements[j];
        bMatchesAll = true;
        for(var k=0; k<arrRegExpClassNames.length; k++){
            if(!arrRegExpClassNames[k].test(oElement.className)){
                bMatchesAll = false;
                break;                      
            }
        }
        if(bMatchesAll)
            arrReturnElements.push(oElement);
		
    }
    return (arrReturnElements)
}

function getElementByClassName(oElm, strTagName, oClassNames){
  arr=getElementsByClassName(oElm, strTagName, oClassNames);
  
  return arr.length==0 ? null : arr[0];
}

function parseClasses(oClassNames){
    return oClassNames.split(' ');
}

function parseClassesContain(oClassNames,testedclass){
	var a = parseClasses(oClassNames);
	for(var i=0; i<a.length; i++){
		if (a[i]==testedclass)
			return true;
	}
	return false;
}

function Smaller(a,b){
  return a<b?a:b;
}
function Bigger(a,b){
  return a>b?a:b;
}

function findPosX(obj)
{
	var curleft = 0;
	if (obj.offsetParent)
	{
		while (obj.offsetParent)
		{
			curleft += obj.offsetLeft
			obj = obj.offsetParent;
		}
	}
	else if (obj.x)
		curleft += obj.x;
	return curleft;
}

function findPosY(obj)
{
	var curtop = 0;
	if (obj.offsetParent)
	{
		while (obj.offsetParent)
		{
			curtop += obj.offsetTop
			obj = obj.offsetParent;
		}
	}
	else if (obj.y)
		curtop += obj.y;
	return curtop;
}

function str2int(s){
  return parseInt(s);
}


function countLineBreaks (string) {
  var re = /\r\n|\r|\n/g;
  var n = 0;
  while (re.exec(string))
    n++;
  return n;
}

function DynTextArea_SetAreas(parent){
  elements=getElementsByClassName(parent,'TEXTAREA','');
  for(i=0; i < elements.length;i++){
    elements[i].onkeyup=new Function('e',"DynTextArea_SetMe(this);");
    DynTextArea_SetMe(elements[i]);
  }
}

function DynTextArea_SetMe(obj) {
  var Min=2, Max=20, LineAproxHeight=20;
  if (document.all) {//IE simple reseni

    while (((obj.scrollHeight > obj.clientHeight)||(obj.rows<Min))&&(obj.rows<Max))//natahovat
      obj.rows++;
    while (((obj.scrollHeight+LineAproxHeight < obj.clientHeight)||(obj.rows>Max))&&(obj.rows>Min))//a i zkracovat
      obj.rows--;
    //obj.scrollTop = 0;
  }
  else if (obj.rows) {
    obj.rows=7;
    /* tohle je trapny reseni, takze v mozile natvrdo
    var lineBreaks = countLineBreaks(textarea.value);
    var rows = parseInt(textarea.rows);
    var wrap = textarea.getAttribute('wrap');
    if (lineBreaks > rows)
      textarea.rows = ++rows;
    else if (wrap.toLowerCase() == 'soft' || wrap.toLowerCase() == 'hard') {
      while (textarea.rows * textarea.cols <= textarea.value.length) {
        textarea.rows = ++rows;
      }
    }
    */
  }
}

function GetCellRelative(tdobj,offsetrow,offsetcol){
  tdindex=MyOrderNum(tdobj);
  //activetr=activetd.parentElement;
  activetr=activetd.parentNode;
  trindex=MyOrderNum(activetr);
  if (desttr=activetr.parentNode.childNodes[trindex+offsetrow*(document.all?1:2)]){
	if (desttd=desttr.childNodes[tdindex+offsetcol]){
	  return desttd;
    }
  }
  return null;
}

/*vraci kolikaty children sveho rodice jsem*/
function MyOrderNum(obj){
  par=obj.parentNode;
  for(var i=0; i<par.childNodes.length; i++)
    if (par.childNodes[i]==obj)
      return i;
  return -1;
}


function DisableSelecting(){
	document.onselectstart=new Function ("return false");
	document.onmousedown=new Function ("return false");
}

function EnableSelecting(){
	document.onselectstart=null;
	document.onmousedown=null;
}


function explode(inputstring, separators, includeEmpties) {
	inputstring = new String(inputstring);
	separators = new String(separators);

	if(separators == "undefined") { 
		separators = " :;";
	}

	fixedExplode = new Array(1);
	currentElement = "";
	count = 0;

	for(x=0; x < inputstring.length; x++) {
		chr = inputstring.charAt(x);
		if(separators.indexOf(chr) != -1) {
			if ( ( (includeEmpties <= 0) || 
				   (includeEmpties == false) ) 
				  && (currentElement == "")) { 
			} else {
				fixedExplode[count] = currentElement;
				count++;
				currentElement = ""; 
			} 
		}else { 
			currentElement += chr; 
		}
	}

	if (( ! (includeEmpties <= 0) && (includeEmpties != false)) || (currentElement != "")) {
		fixedExplode[count] = currentElement; 
	}
	return fixedExplode;
}

/*HEX to DEC*/
var hD="0123456789ABCDEF";
function d2h(d) {
var h = hD.substr(d&15,1);
while(d>15) {d>>=4;h=hD.substr(d&15,1)+h;}
return h;
}
function h2d(h) {return parseInt(h,16);}




var HelpWindowObj,HelpWindowCall;
function ShowHelp(me,text){
	if (HelpWindowObj){//napoveda je jiz aktivni
		if (HelpWindowCall==me){//a je to ta stejna!!
			HideHelp();//skryt
			return;		//a odejit
		}
		HideHelp(); //jen skryt
	}
	
	x=findPosX(me);
	y=findPosY(me);
	w=300;
	h=200;
	//alert(x+":"+y+" - "+text);
	var obj=document.createElement("div");//hlavni objekt
	obj.id="helpwin";
	obj.className="helpwindow";
    obj.style.position="absolute";
    //obj.style.left=(x-w+10)+"px";
    //obj.style.top=y+6+"px";
    obj.style.left=(x-w+54)+"px";
    obj.style.top=y+10+"px";
    obj.onclick=HideHelp;
    document.body.appendChild(obj);
    
    var obji=document.createElement("div");
    obji.className="helpwindowIN";
    obji.onclick=HideHelp;
    obj.appendChild(obji);
    
    var objii=document.createElement("div");
    objii.className="helpwindowININ";
    objii.onclick=HideHelp;
    obji.appendChild(objii);
    
    var cb=document.createElement("div");
    cb.className="closewin";
    cb.onclick=HideHelp;
    objii.appendChild(cb);
    
    var ta=document.createElement("div");
    ta.className="text";
    ta.innerHTML=text;
    objii.appendChild(ta);
    
    HelpWindowObj=obj;
    HelpWindowCall=me;
	return false;
}
function HideHelp(){
	if (HelpWindowObj){
		document.body.removeChild(HelpWindowObj);
		HelpWindowObj=null;
		HelpWindowCall=null;
	}
}













function nozeros(input) {
		return input;
		if((input.length > 1) && (input.substr(0,1) == "0")) {
			return input.substr(1);
		} else {
			return input;
		}
	}
	function unixtimetodate(time) {
		var theDate = new Date(time*1000);
		if(theDate.toLocaleString)
			return theDate.toLocaleString();
		return theDate.toGMTString();
	}
	function datetounixtime() {
		var humDate = new Date(Date.UTC(document.date2unixtime.vyy.value, (nozeros(document.date2unixtime.vmm.value)-1),
          nozeros(document.date2unixtime.vdd.value), nozeros(document.date2unixtime.vhh.value),
          nozeros(document.date2unixtime.vmin.value), nozeros(document.date2unixtime.vsec.value)));
		document.date2unixtime.output.value = (humDate.getTime()/1000.0);
	}

function popup(URL,w,h){
	day = new Date();
	id = day.getTime();
	eval("page" + id + " = window.open(URL, '_blank', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width="+w+",height="+h+",left = 320,top = 240');");
	//eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width="+w+",height="+h+",left = 320,top = 240');");
}

function AddEvent(obj,etype,fn){
	if (!obj) obj=document;
	if(window.opera && (obj == window)) obj = document;
	
	if(document.addEventListener)   
         obj.addEventListener(etype, fn, false);
	else
         obj.attachEvent('on' + etype, fn);
}

function RemoveEvent(obj,etype,fn){
	if (!obj) obj=document;
	if(window.opera && (obj == window)) obj = document;
	
	if(document.removeEventListener)
        obj.removeEventListener(etype, fn, false);
    else
		obj.detachEvent('on' + etype, fn);
}

function SrcFromEvent(e){
	if(!e) return null;
	if (navigator.appName == "Microsoft Internet Explorer" && e.srcElement) {
      return e.srcElement;
  } else if(e.target) {  // is mozilla/netscape
      // need to crawl up the tree to get the first "real" element
      // i.e. a tag, not raw text
      var o = e.target;
      while (!o.tagName) {
          o = o.parentNode;
      }
      return o;
  }
  return e;
}

//stejna sirka floatujicich elementu:
//pro prvky volej DoSameAdd s vymyslenym stejnym id a objektem
//uzavri zavolanim DoSameGo s onym id
//vsechny prvky pridane pres Add budou mit sirku jako nejsirsi
//element pridany pres Add

  var DoSame = new Array();
  
  function DoSameAdd(id,obj){
    if (!DoSame[id])
      DoSame[id]=new Array();
    DoSame[id].push(obj);
  }
  
  function DoSameGo(id){
    var max=0;
    for(var i in DoSame[id])
      if (DoSame[id][i].offsetWidth>max)
        max=DoSame[id][i].offsetWidth;
    for(var i in DoSame[id])
      DoSame[id][i].style.width=max+"px";
  }
  
  
//BGPROCESS support

function BGPStart(caption,m1,pb1,m2,pb2,m3){
  var bgp = getId('progresswindow');
  SetDisplaying(bgp,true);
  if (!caption) caption='';
  if (!m1) m1='';
  if (!m2) m2='';
  if (!m3) m3='';
  if (!pb1) pb1=-1;
  if (!pb2) pb2=-1;
  BGPSetC(caption);
  BGPSetM1(m1);
  BGPSetM2(m2);
  BGPSetM3(m3);
  BGPSetP1(pb1);
  BGPSetP2(pb2);

  SetDisplaying("windowdisabler",true);
  getId("windowdisabler").style.width=GetPageWidth()+"px";
  getId("windowdisabler").style.height=GetPageHeight()+"px";
}

function GetPageWidth(){
    return (!document.body.scrollWidth)?document.width:document.body.scrollWidth;
}
function GetPageHeight(){
    return (!document.body.scrollHeight)?document.height:document.body.scrollHeight;
}


function BGPSetProgressBar(val,id){
    var obj = getId("progresswindow_p"+id);
    var barobj = getElementByClassName(obj, '*', 'bar');
    var textobj = getElementByClassName(obj, '*', 'text');
    if ((val<-1)||(val>100)) val=-1;
    SetDisplaying(obj,val!=-1);
    barobj.style.width=obj.offsetWidth*val/100+"px";
    textobj.innerHTML=val+"%";
}
			    
function BGPSetC(x){  getId('progresswindow_c').innerHTML=x; }

function BGPSetM1(x){  getId('progresswindow_m1').innerHTML=x; }
function BGPSetM2(x){  getId('progresswindow_m2').innerHTML=x; }
function BGPSetM3(x){  getId('progresswindow_m3').innerHTML=x; }

function BGPSetP1(x){ BGPSetProgressBar(x,1) }
function BGPSetP2(x){ BGPSetProgressBar(x,2) } 



/*************druhy adminbar, example viz watermark****************/
  
  function SASetActive(id){
    var spage = getId('spage'+id);
    var abutton = getId('ab'+id);
    
    //disable all
    i= (getId('spage0')) ? 0 : 1;//cislovani od 0 ci od 1
    
    var tmp;
    while (tmp=getId('spage'+i)){
      if (tmp!=spage){
        SetDisplaying(tmp, false);
        getId('ab'+i).className="button";
      }
      i++;
    }
    //activate 
    SetDisplaying(spage, true);
    abutton.className="button buttonActive";
    
    return false;
  }

//ziska objekt se scroll top a bottom
function getScrollXY() {
  var scrOfX = 0, scrOfY = 0;
  if( typeof( window.pageYOffset ) == 'number' ) {
    //Netscape compliant
    scrOfY = window.pageYOffset;
    scrOfX = window.pageXOffset;
  } else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
    //DOM compliant
    scrOfY = document.body.scrollTop;
    scrOfX = document.body.scrollLeft;
  } else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
    //IE6 standards compliant mode
    scrOfY = document.documentElement.scrollTop;
    scrOfX = document.documentElement.scrollLeft;
  }
  return [ scrOfX, scrOfY ];
}

/*************** BigImageView ******************/
/**
 * zobrazi obrazek na sedem pozadi pres celou pbrazovku
 **/ 
function BigImageView(idframe,srcframe,intext){
	var objMain=document.createElement("div");
	objMain.id = idframe;
	objMain.style.width=GetPageWidth()+'px';
	objMain.style.height=GetPageHeight()+'px';
	objMain.style.position='absolute';
	objMain.style.left='0';
	objMain.style.top='0';
	objMain.style.zIndex=1000;
	
	AddEvent(objMain,'click',BigImageViewEventClose);
	
	var objIn = document.createElement("div");
	objIn.id = idframe+'INNER';
	objIn.style.position='absolute';
	objIn.style.left='0';
	var winScroll=getScrollXY();
	objIn.style.top=winScroll[1]+'px';
	objIn.style.zIndex=1010;
	objIn.style.width=GetPageWidth()+'px';
	objIn.style.height=(GetPageHeight()-winScroll[1])+'px';
	objIn.style.backgroundImage="url('"+srcframe+"')";
	
	if(intext && isString(intext)){
		objIn.innerHTML=intext;
	}
	
	document.body.appendChild(objIn);
	
	AddEvent(objIn,'click',BigImageViewEventClose);
	
	if(document.all){
		var selects=getElementsByClassName(null,'SELECT','*');
		for(var i in selects){
			SetVisibility(selects[i],false);
		}
	}
	
	document.body.appendChild(objMain);
	return false;
}

function BigImageViewEventClose(e){
	var obj=SrcFromEvent(e);	
	if(obj){
		var obj2 = null;
		if(obj.id.indexOf('INNER')>0){
			obj2=getId(obj.id.substring(0,obj.id.indexOf('INNER')));
		}else 
			obj2=getId(obj.id+'INNER');
		obj.parentNode.removeChild(obj);
		if(obj2)
			obj2.parentNode.removeChild(obj2);
	}
	if(document.all){
		var selects=getElementsByClassName(null,'SELECT','*');
		for(var i in selects){
			SetVisibility(selects[i],true);
		}
	}
}

/**
 * Trida slouzi pro zmenu kursoru nad jakymkoliv objektem po najeti.
 * img - obrazek kursoru
 * w,h - rozmery obrazku s kursorem
 * x,y - pozice v obrazku, ktera bude na pozici mysi 
 **/ 
function CustomCursor(parent,img,w,h,x,y){
	var elThis = this;
	this.objCursor = document.createElement('div');
	this.objCursor.className='custom-cursor';
	this.objCursor.style.position='absolute';
	this.objCursor.style.zIndex='2000';
	if(document.all && document.getElementById && !window.opera){
		this.objCursor.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+img+"', sizingMethod='crop');";
	}else{
		this.objCursor.style.backgroundImage='url('+img+')';
	}
	this.objCursor.style.width=w+'px';
	this.objCursor.style.height=h+'px';
	this.objCursor.style.display='none';
	this.objCursor.style.left='0';
	this.objCursor.style.top='0';
	
	this.x = x;
	this.y = y;
	
	if(!parent) return false;
	parent.appendChild(this.objCursor);
	parent.style.position='relative';
	this.parent=parent;
	
	this.SetPos = function(x,y){
		elThis.objCursor.style.left=x-findPosX(elThis.parent)-elThis.x+'px';
		elThis.objCursor.style.top=y-findPosY(elThis.parent)-elThis.y+'px';
	}
	
	this.overObj = null;
	this.Over = function(e){
		elThis.overObj = SrcFromEvent(e);
		if(elThis.overObj.tagName.toLowerCase()!='a') 
			elThis.overObj=elThis.overObj.parentNode;
		
		
		e = e || window.event || {};
		x=e.clientX ? e.clientX+document.documentElement.scrollLeft : e.pageX;
		y=e.clientY ? e.clientY+document.documentElement.scrollTop : e.pageY;
		if ((!x)||(!y)) return;
		
		elThis.SetPos(x,y);
		
		SetDisplaying(elThis.objCursor,true);
	}
	
	this.Move = function(e){
		e = e || window.event || {};
		x=e.clientX ? e.clientX+document.documentElement.scrollLeft : e.pageX;
		y=e.clientY ? e.clientY+document.documentElement.scrollTop : e.pageY;
		if ((!x)||(!y)) return;
		
		elThis.SetPos(x,y);
	}
	
	this.Out = function(e){
		SetDisplaying(elThis.objCursor,false);
		elThis.overObj=false;				
	}
	
	this.parentClick = function(e){
		//alert(elThis.overObj);
		//if(elThis.overObj)
		//	elThis.overObj.click();
	}
	
	this.cursorClick = function(e){
		alert(elThis.overObj);
		if(elThis.overObj)
			elThis.overObj.click();
	}
	
	this.Add = function(obj){
		if(!obj) return;
		AddEvent(obj,'mouseover',this.Over);
		//AddEvent(obj,'mousemove',this.Move);
		AddEvent(obj,'mouseout',this.Out);
	}	
	AddEvent(this.objCursor,'mousemove',this.Move);
	AddEvent(this.parent,'mousemove',this.Move);		
	//AddEvent(this.parent,'click',this.parentClick);
	//AddEvent(this.objCursor,'click',this.cursorClick);
}

function findWidth (object){ 
    if (isString(object)) object=getId(object);        
    if(object.offsetWidth) return object.offsetWidth; 
    if(object.clip && object.clip.width) return object.clip.width; 
    return (null); 
}

function findHeight (object){ 
    if (isString(object)) object=getId(object);
    if(object.offsetHeight) return object.offsetHeight; 
    if(object.clip && object.clip.height) return object.clip.height;
		return (null);  
} 

function printPrice (price){
	var tcost='';
	while(price>=1){
		var cm=(price%1000);
		//alert(price+'   '+cm+' '+Math.floor(price/1000));
		price=Math.floor(price/1000);
		
		tcost=cm+(tcost=='' ? '' : ' ')+tcost;
		if(cm<10 && price>=1)
			tcost='0'+tcost;
		if(cm<100 && price>=1)						
			tcost='0'+tcost;
		
		//alert(tcost);
	}
	tcost=tcost+',00';
	return tcost;
}

function BGPSetURL(x){ document.location=x; }

function siteRefresh(sec){
	if(!sec) sec=0;
	sec=sec*1;
	if(sec>0) setTimeout("siteRefresh(0)",sec*1000);
	else window.location.href=window.location.href;
}


    var g_PopupIFrame;

    function IsIE()
    {

        return ( navigator.appName=="Microsoft Internet Explorer" );

    }

    function HidePopupDiv(divID)
    {

        var divPopup;
        divPopup=document.getElementById(divID);
        divPopup.style.visibility = "hidden";

        if (IsIE())
        {

            document.body.removeChild(g_PopupIFrame);
            g_PopupIFrame=null;

        }

    }

    function ShowPopupDiv(divID)
    {
        //
        var divPopup=document.getElementById(divID);

        if (!IsIE())
        {

            //Just display the div
            divPopup.style.visibility ="visible";
            return;

        }
        
        //je-li uz iframe zobrazeny, puvodni schovej
        if ((g_PopupIFrame)&&(g_PopupIFrame.name)){
          HidePopupDiv(g_PopupIFrame.name);
        }
        

        //Increase default zIndex of div by 1, so that DIV appears before IFrame
        divPopup.style.zIndex=divPopup.style.zIndex+1;

        var iFrame = document.createElement("IFRAME");
        iFrame.setAttribute("src", "");
        iFrame.setAttribute("name", divID);

        //Match IFrame position with divPopup
        iFrame.style.position="absolute";
        iFrame.style.left =divPopup.offsetLeft + 'px';
        iFrame.style.top =divPopup.offsetTop + 'px';
        iFrame.style.width =divPopup.offsetWidth + 'px';
        iFrame.style.height =divPopup.offsetHeight + 'px';

        document.body.appendChild(iFrame);

        //Store iFrame in global variable, so it can get removed when divPopup is hidden 
        g_PopupIFrame=iFrame;
        divPopup.style.visibility ="visible";

    }

var Utf8 = {

    // public method for url encoding
    encode : function (string) {
        if (!isString(string)){
          return "";
        }
        string = string.replace(/\r\n/g,"\n");
        var utftext = "";

        for (var n = 0; n < string.length; n++) {

            var c = string.charCodeAt(n);

            if (c < 128) {
                utftext += String.fromCharCode(c);
            }
            else if((c > 127) && (c < 2048)) {
                utftext += String.fromCharCode((c >> 6) | 192);
                utftext += String.fromCharCode((c & 63) | 128);
            }
            else {
                utftext += String.fromCharCode((c >> 12) | 224);
                utftext += String.fromCharCode(((c >> 6) & 63) | 128);
                utftext += String.fromCharCode((c & 63) | 128);
            }

        }

        return utftext;
    },

    // public method for url decoding
    decode : function (utftext) {
        if (!utftext) utftext="";
        var string = "";
        var i = 0;
        var c = c1 = c2 = 0;

        while ( i < utftext.length ) {

            c = utftext.charCodeAt(i);

            if (c < 128) {
                string += String.fromCharCode(c);
                i++;
            }
            else if((c > 191) && (c < 224)) {
                c2 = utftext.charCodeAt(i+1);
                string += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
                i += 2;
            }
            else {
                c2 = utftext.charCodeAt(i+1);
                c3 = utftext.charCodeAt(i+2);
                string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
                i += 3;
            }

        }

        return string;
    }

}




function unserialize(data){
  var h = new HTML_AJAX_Serialize_PHP();
	return h.unserialize(Utf8.encode(data));
}

function serialize(data){
  var h = new HTML_AJAX_Serialize_PHP();
	return Utf8.decode(h.serialize(data));
}





/**
 * Utility methods
 *
 * @category   HTML
 * @package    Ajax
 * @license    http://www.opensource.org/licenses/lgpl-license.php  LGPL
 *
 * See Main.js for author/license details
 */
// {{{ HTML_AJAX_Util
/**
 * All the utilities we will be using thorough the classes
 */
HTML_AJAX_Util = {
    // Set the element event
    registerEvent: function(element, event, handler) 
    {
        //var element = document.getElementById(id);
        if (typeof element.addEventListener != "undefined") {   //Dom2
            element.addEventListener(event, handler, false);
        } else if (typeof element.attachEvent != "undefined") { //IE 5+
            element.attachEvent("on" + event, handler);
        } else {
            if (element["on" + event] != null) {
                var oldHandler = element["on" + event];
                element["on" + event] = function(e) {
                    oldHander(e);
                    handler(e);
                };
            } else {
                element["on" + event] = handler;
            }
        }
    },
    // get the target of an event, automatically checks window.event for ie
    eventTarget: function(event) 
    {
        if (!event) var event = window.event;
        if (event.target) return event.target; // w3c
        if (event.srcElement) return event.srcElement; // ie 5
    },
    // gets the type of a variable or its primitive equivalent as a string
    getType: function(inp) 
    {
        var type = typeof inp, match;
        if(type == 'object' && !inp)
        {
            return 'null';
        }
        if (type == "object") {
            if(!inp.constructor)
            {
                return 'object';
            }
            var cons = inp.constructor.toString();
            if (match = cons.match(/(\w+)\(/)) {
                cons = match[1].toLowerCase();
            }
            var types = ["boolean", "number", "string", "array"];
            for (key in types) {
                if (cons == types[key]) {
                    type = types[key];
                    break;
                }
            }
        }
        return type;
    },
    // repeats the input string the number of times given by multiplier. exactly like PHP's str_repeat()
    strRepeat: function(inp, multiplier) {
        var ret = "";
        while (--multiplier > 0) ret += inp;
        return ret;
    },
    // recursive variable dumper similar in output to PHP's var_dump(), the differences being: this function displays JS types and type names; JS doesn't provide an object number like PHP does
    varDump: function(inp, printFuncs, _indent, _recursionLevel)
    {
        if (!_recursionLevel) _recursionLevel = 0;
        if (!_indent) _indent = 1;
        var tab = this.strRepeat("  ", ++_indent);    
        var type = this.getType(inp), out = type;
        var consrx = /(\w+)\(/;
        consrx.compile();
        if (++_recursionLevel > 6) {
            return tab + inp + "Loop Detected\n";
        }
        switch (type) {
            case "boolean":
            case "number":
                out += "(" + inp.toString() + ")";
                break;
            case "string":
                out += "(" + inp.length + ") \"" + inp + "\"";
                break;
            case "function":
                if (printFuncs) {
                    out += inp.toString().replace(/\n/g, "\n" + tab);
                }
                break;
            case "array":
            case "object":
                var atts = "", attc = 0;
                try {
                    for (k in inp) {
                        atts += tab + "[" + (/\D/.test(k) ? "\"" + k + "\"" : k)
                            + "]=>\n" + tab + this.varDump(inp[k], printFuncs, _indent, _recursionLevel);
                        ++attc;
                    }
                } catch (e) {}
                if (type == "object") {
                    var objname, objstr = inp.toString();
                    if (objname = objstr.match(/^\[object (\w+)\]$/)) {
                        objname = objname[1];
                    } else {
                        try {
                            objname = inp.constructor.toString().match(consrx)[1];
                        } catch (e) {
                            objname = 'unknown';
                        }
                    }
                    out += "(" + objname + ") ";
                }
                out += "(" + attc + ") {\n" + atts + this.strRepeat("  ", _indent - 1) +"}";
                break;
        }
        return out + "\n";
    },
    quickPrint: function(input) {
        var ret = "";
        for(var i in input) {
            ret += i+':'+input[i]+"\n";
        }
        return ret;
    },
    //compat function for stupid browsers in which getElementsByTag with a * dunna work
    getAllElements: function(parentElement)
    {
        //check for idiot browsers
        if( document.all)
        {
            if(!parentElement) {
                var allElements = document.all;
            }
            else
            {
                var allElements = [], rightName = new RegExp( parentElement, 'i' ), i;
                for( i=0; i<document.all.length; i++ ) {
                    if( rightName.test( document.all[i].parentElement ) )
                    allElements.push( document.all[i] );
                }
            }
            return allElements;
        }
        //real browsers just do this
        else
        {
            if (!parentElement) { parentElement = document.body; }
            return parentElement.getElementsByTagName('*');
        }
    },
    getElementsByClassName: function(className, parentElement) {
        var allElements = HTML_AJAX_Util.getAllElements(parentElement);
        var items = [];
        var exp = new RegExp('(^| )' + className + '( |$)');
        for(var i=0,j=allElements.length; i<j; i++)
        {
            if(exp.test(allElements[i].className))
            {
                items.push(allElements[i]);
            }
        }
        return items;
    },
    getElementsByCssSelector: function(selector) {
        return cssQuery(selector);
    },
    htmlEscape: function(inp) {
        var rxp, chars = [
            ['&', '&amp;'],
            ['<', '&lt;'],
            ['>', '&gt;']
        ];
        for (i in chars) {
            inp.replace(new RegExp(chars[i][0]), chars[i][1]);
        }
        return inp;
    },
    // return the base of the given absolute url, or the filename if the second argument is true
    baseURL: function(absolute, filename) {
        var qPos = absolute.indexOf('?');
        if (qPos >= 0) {
            absolute = absolute.substr(0, qPos);
        }
        var slashPos = Math.max(absolute.lastIndexOf('/'), absolute.lastIndexOf('\\'));
        if (slashPos < 0) {
            return absolute;
        }
        return (filename ? absolute.substr(slashPos + 1) : absolute.substr(0, slashPos + 1));
    },
    // return the query string from a url
    queryString: function(url) {
        var qPos = url.indexOf('?');
        if (qPos >= 0) {
            return url.substr(qPos+1);
        }
    },
    // return the absolute path to the given relative url
    absoluteURL: function(rel, absolute) {
        if (/^https?:\/\//i.test(rel)) {
            return rel;
        }
        if (!absolute) {
            var bases = document.getElementsByTagName('base');
            for (i in bases) {
                if (bases[i].href) {
                    absolute = bases[i].href;
                    break;
                }
            }
            if (!absolute) {
                absolute = window.location.href;
            }
        }
        if (rel == '') {
            return absolute;
        }
        if (rel.substr(0, 2) == '//') {
            // starts with '//', replace everything but the protocol
            var slashesPos = absolute.indexOf('//');
            if (slashesPos < 0) {
                return 'http:' + rel;
            }
            return absolute.substr(0, slashesPos) + rel;
        }
        var base = this.baseURL(absolute);
        var absParts = base.substr(0, base.length - 1).split('/');
        var absHost = absParts.slice(0, 3).join('/') + '/';
        if (rel.substr(0, 1) == '/') {
            // starts with '/', append it to the host
            return absHost + rel;
        }
        if (rel.substr(0, 1) == '.' && rel.substr(1, 1) != '.') {
            // starts with '.', append it to the base
            return base + rel.substr(1);
        }
        // remove everything upto the path and beyond 
        absParts.splice(0, 3);
        var relParts = rel.split('/');
        var loopStart = relParts.length - 1;
        relParts = absParts.concat(relParts);
        for (i = loopStart; i < relParts.length;) {
            if (relParts[i] == '..') {
                if (i == 0) {
                    return absolute;
                }
                relParts.splice(i - 1, 2);
                --i;
                continue;
            }
            i++;
        }
        return absHost + relParts.join('/');
    },
    // replace matches to the given regex with a callback, like preg_replace_callback
    replaceCallback: function(regex, callback, subject, args)
    {
        var matches, output = '';
        while (true) {
            matches = regex.exec(subject);
            if (matches && matches[0]) {
                subject = RegExp.rightContext;
                output += RegExp.leftContext + callback(matches, args);
            } else {
                break;
            }
        }
        output += subject;
        return output;
    },
    // set the innerhtml of an element, make the third parameter true to append
    _ihDelim:       '__HAX_IH__',
    _ihScriptDelim: '__SCRIPT__',
    setInnerHTML: function(node, innerHTML, append)
    {
        if (!append) {
            node.innerHTML = '';
        }
        node.scripts = [];
        node.scriptKey = 0;
        node.onloadKey = 0;
        var onload_regex = /<(.+?)onload=(["\']?)(.+?)\2(.*?)>/i;
        var script_atts = '(\\s*(\\w+)=["\']?(.*?)["\']?\\s*)?';
        var script_regex = '<script';
        for (i = 0; i < 10; i++) {
            script_regex += script_atts;
        }
        script_regex += '\\s*>(.*?)</script>';
        script_regex = new RegExp(script_regex, 'i');
        innerHTML = this.replaceCallback(onload_regex, this._ihRegisterOnload, innerHTML, node);
        innerHTML = this.replaceCallback(script_regex, this._ihRegisterScript, innerHTML, node);
        this._ihExpandHTML(node, innerHTML);
    },
    // setInnerHTML helper functons
    _ihExpandHTML: function(node, html)
    {
        vals = new String(html).split(this._ihDelim);
        for (vkey in vals) {
            val = vals[vkey];
            if (val.substring(0, this._ihScriptDelim.length) != this._ihScriptDelim) {
                node.innerHTML += val;
                continue;
            }
            val = val.substring(this._ihScriptDelim.length);
            if (!node.scripts || !node.scripts[val]) {
                continue;
            }
            if (node.scripts[val][0]) {
                eval(node.scripts[val][0]);
            }
            if (node.scripts[val][1]) {
                script = document.createElement("SCRIPT");
                for (akey in node.scripts[val][1]) {
                    script.setAttribute(akey, node.scripts[val][1][akey]);
                }
                node.appendChild(script);
            }
        }
    },
    _ihRegisterScript: function(matches, node)
    {
        cont = matches[matches.length - 1]; 
        cont = cont.replace(/document\.write\((.*?)\)/ig, 
            'document.getElementById("' + node.id + '").innerHTML+=$1');
        var catts = {};
        for (var i = 2; i + 3 < matches.length; i += 3) { 
            catts[matches[i]] = matches[i + 1];
        }
        node.scripts[++node.scriptKey] = [cont, catts];
        return HTML_AJAX_Util._ihDelim + HTML_AJAX_Util._ihScriptDelim +
            node.scriptKey.toString() + HTML_AJAX_Util._ihDelim;
    },
    _ihRegisterOnload: function(matches, node) 
    { 
        var onload = matches[3]; 
        var rem = matches[1] + matches[4]; 
        var idm = /\bid=["\']?(.+?)["\']?/i.exec(rem);
        if (idm) {
            var id = idm[1];
        } else { 
            var id = 'html_ajax_onload_' + node.onloadKey++;
            rem += ' id="' + id + '"';
        } 
        onload = onload.replace('this.', 'document.getElementById("' + id + '").');
        rem = '<' + rem + '>' + HTML_AJAX_Util._ihRegisterScript([onload], node);
        return rem;
    },
    _writeInnerHTML: function(node, innerHTML)
    {
        node.innerHTML += innerHTML;
    }
}

// }}}
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */





// {{{ HTML_AJAX_Serialize_PHP
/**
 * PHP serializer
 *
 * This class can be used to serialize and unserialize data in a
 * format compatible with PHP's native serialization functions.
 *
 * @version	0.0.3
 * @copyright	2005 Arpad Ray <arpad@php.net>
 * @license	http://www.opensource.org/licenses/lgpl-license.php  LGPL
 *
 * See Main.js for Author/license details
 */

function HTML_AJAX_Serialize_PHP() {}
HTML_AJAX_Serialize_PHP.prototype = {
        error: false,
        message: "",
        cont: "",
        defaultEncoding: 'UTF-8',
        contentType: 'application/php-serialized; charset: UTF-8',
        // {{{ serialize
	/**
        *  Serializes a variable
        *
        *  @param	mixed  inp the variable to serialize
        *  @return	string   a string representation of the input, 
        *					  which can be reconstructed by unserialize()
        *  @author Arpad Ray <arpad@rajeczy.com>
        *  @author David Coallier <davidc@php.net>
        *  uprava!!! nody parent se ignoruji!        
        */
        serialize: function(inp) {
                var type = HTML_AJAX_Util.getType(inp);
                var val;
                switch (type) {
                        case "undefined":
                                val = "N";
                                break;
                        case "boolean":
                                val = "b:" + (inp ? "1" : "0");
                                break;
                        case "number":
                                val = (Math.round(inp) == inp ? "i" : "d") + ":" + inp;
                                break;
                        case "string":
                                //uprava: prevod na ulozitelne degradovane utf
                                inp=Utf8.encode(inp);
                                val = "s:" + inp.length + ":\"" + inp + "\"";
                                break;
                        case "array":
                                val = "a";
                        case "object":
                                if (type == "object") {
                                        var objname = inp.constructor.toString().match(/(\w+)\(\)/);
                                        if ((objname == undefined)||(objname=='parent')) {
                                                return;
                                        }
                                        objname[1] = this.serialize(objname[1]);
                                        val = "O" + objname[1].substring(1, objname[1].length - 1);
                                }
                                var count = 0;
                                var vals = "";
                                var okey;
                                for (key in inp) {
                                        if ( key == 'parent' ) continue;
                                        okey = (key.match(/^[0-9]+$/) ? parseInt(key) : key);
                                        vals += this.serialize(okey) + 
                                                        this.serialize(inp[key]);
                                        count++;
                                }
                                val += ":" + count + ":{" + vals + "}";
                                break;
                        default:
                              val = "N";
                }
                if (type != "object" && type != "array") val += ";";
                return val;
        },
        // }}} 
	// {{{ unserialize
	/**
         *  Reconstructs a serialized variable
         *
         *  @param	string inp the string to reconstruct
         *  @return   mixed the variable represented by the input string, or void on failure
         */
        unserialize: function(inp) {
                this.lastinp=inp;
                this.error = 0;
                if (inp == "" || inp.length < 2) {
                        this.raiseError("input is too short");
                        return;
                }
                var val, kret, vret, cval;
                var type = inp.charAt(0);
                var cont = inp.substring(2);
                var size = 0, divpos = 0, endcont = 0, rest = "", next = "";

                switch (type) {
                case "N": // null
			                  if (inp.charAt(1) != ";") {
                                this.raiseError("missing ; for null", cont);
                        }
                        // leave val undefined
			                  rest = cont;
                        break;
                case "b": // boolean
			                  if (!/[01];/.test(cont.substring(0,2))) {
                                this.raiseError("value not 0 or 1, or missing ; for boolean", cont);
                        }
                        val = (cont.charAt(0) == "1");
                        rest = cont.substring(1);
                        break;
                case "s": // string
			                  val = "";
                        divpos = cont.indexOf(":");
                        if (divpos == -1) {
                                this.raiseError("missing : for string", cont);
                                break;
                        }
                        size = parseInt(cont.substring(0, divpos));
                        if (size == 0) {
                                if (cont.length - divpos < 4) {
                                        this.raiseError("string is too short", cont);
                                        break;
                                }
                                rest = cont.substring(divpos + 4);
                                break;
                        }
                        if ((cont.length - divpos - size) < 4) {
                                this.raiseError("string is too short", cont);
                                break;
                        }
                        if (cont.substring(divpos + 2 + size, divpos + 4 + size) != "\";") {
                                this.raiseError("string is too long, or missing \";", cont);
                        }
                        //uprava: prevod na citelne utf
                        val = Utf8.decode( cont.substring(divpos + 2, divpos + 2 + size) );
                        rest = cont.substring(divpos + 4 + size);
                        break;
                case "i": // integer
		            case "d": // float
			                  var dotfound = 0;
                        for (var i = 0; i < cont.length; i++) {
                                cval = cont.charAt(i);
                                if ((cval!='-') && isNaN(parseInt(cval)) && !(type == "d" && cval == "." && !dotfound++)) {
                                        endcont = i;
                                        break;
                                }
                        }
                        if (!endcont || cont.charAt(endcont) != ";") {
                                this.raiseError("missing or invalid value, or missing ; for int/float", cont);
                        }
                        val = cont.substring(0, endcont);
                        val = (type == "i" ? parseInt(val) : parseFloat(val));
                        rest = cont.substring(endcont + 1);
                        break;
                case "a": // array
			                  if (cont.length < 4) {
                                this.raiseError("array is too short", cont);
                                return;
                        }
                        divpos = cont.indexOf(":", 1);
                        if (divpos == -1) {
                                this.raiseError("missing : for array", cont);
                                return;
                        }
                        size = parseInt(cont.substring(0, divpos));
                        cont = cont.substring(divpos + 2);
                        val = new Array();
                        if (cont.length < 1) {
                                this.raiseError("array is too short", cont);
                                return;
                        }
                        for (var i = 0; i < size; i++) {
                                kret = this.unserialize(cont, 1);
                                if (this.error || kret[0] == undefined || kret[1] == "") {
                                        this.raiseError("missing or invalid key, or missing value for array", cont);
                                        return;
                                }
                                vret = this.unserialize(kret[1], 1);
                                if (this.error) {
                                        this.raiseError("invalid value for array", cont);
                                        return;
                                }
                                val[kret[0]] = vret[0];
                                cont = vret[1];
                        }
                        if (cont.charAt(0) != "}") {
                                this.raiseError("missing ending }, or too many values for array", cont);
                                return; 
                        }
                        rest = cont.substring(1);
                        break;
                case "O": // object
			                  divpos = cont.indexOf(":");
                        if (divpos == -1) {
                                this.raiseError("missing : for object", cont);
                                return;
                        }
                        size = parseInt(cont.substring(0, divpos));
                        var objname = cont.substring(divpos + 2, divpos + 2 + size);
                        if (cont.substring(divpos + 2 + size, divpos + 4 + size) != "\":") {
                                this.raiseError("object name is too long, or missing \":", cont);
                                return;
                        }
                        var objprops = this.unserialize("a:" + cont.substring(divpos + 4 + size), 1);
                        if (this.error) {
                                this.raiseError("invalid object properties", cont);
                                return;
                        }
                        rest = objprops[1];
                        var objout = "function " + objname + "(){";
                        for (key in objprops[0]) {
                                objout += "this." + key + "=objprops[0]['" + key + "'];";
                        }
                        objout += "}val=new " + objname + "();";
                        eval(objout);
                        break;
                default:
                        this.raiseError("invalid input type", cont);
                }
                return (arguments.length == 1 ? val : [val, rest]);
        },
        // }}}
	// {{{ getError
	/**
        *  Gets the last error message
        *
        *  @return	string   the last error message from unserialize()
        */	
        getError: function() {
                return this.message + "\n" + this.cont;
        },
        // }}}
	// {{{ raiseError
	/**
        *  Raises an eror (called by unserialize().)
        *
        *  @param	string	message	the error message
        *  @param	string	cont	   the remaining unserialized content
        */	
        raiseError: function(message, cont) {
                this.error = 1;
                this.message = message;
                this.cont = cont;
                if (DEBUGIT){
                  var t = new Object();
                  t.INFO="serializer report:";
                  t.error=this.error;
                  t.message=this.message;
                  t.lastinp=this.lastinp;
                  //AlertVar(t);
                }
        }
        // }}}
}
// }}}
