

function GE(id) {
    return document.getElementById(id)
}
function GS(id,style_property){
    return parseInt(YAHOO.util.Dom.getStyle(id, style_property) );
}
function myRemoveNode(obj){
  if (obj)   
      if (obj.removeNode)
                obj.removeNode(true);
       else { 
            var parent = obj.parentNode;
            parent.removeChild(obj);
        } 
}
function GoL(link){
    if (link.length > 0) document.location.href = link;
}
function wlog( content,flAddNew){
    var  id="logger";
    var dv = GE(id);
    
    if (!dv){
        dv = document.createElement('div');
        dv.setAttribute('id',id);
	    document.body.appendChild(dv);
    }
     
    if (flAddNew)
        dv.innerHTML =content+ "<br>"
    else
        dv.innerHTML =  dv.innerHTML +content+"<br>"
   
        
}

var gFirstBlog_link='';
function SetLIs(){
    var k = 0;

   var oPaN = GE("thumbnails");  
  // var iL = oPaN.childNodes.length; 
   if(oPaN){
       for (i=0; i< oPaN.childNodes.length; i++) {
              // alert(i+': '+oPaN.childNodes[i].nodeType)

            if (oPaN.childNodes[i].nodeType == 1){
                if (k%5 == 0 & k!=0){
                    o = document.createElement('br');
                    o.className = "clearme";
                    oPaN.insertBefore(o, oPaN.childNodes[i]);
                    i++;// because we have added one element more before the current.The next one that we want to examine is not the i+1,but i+2
                }
                k++;
            }
        }
        if ((k-1)%5 !=1){
            o = document.createElement('br');
            o.className = "clearme";
            oPaN.appendChild(o);
        }
    }
}



/*
 var f = window.onload; 
if (typeof f == 'function'){
    window.onload = function() {
        f();
        OnloadFunc();
    }
}else window.onload = OnloadFunc;

*/
function OnloadFunc(){
    SetLIs()
}

function ShowL(){
    GE('largeIm').style.display = 'block';
}


