// JavaScript Document

function magic() {
  for (var i=0; i<40;i++){
    if (document.getElementById('adiv'+i)){
      	var div=document.getElementById('adiv'+i);
      	if (document.getElementById('bdiv'+i)) var div2=document.getElementById('bdiv'+i);
      	if (document.getElementById('bdiv'+i)) var len=div2.innerHTML.length;
      	if (len<4){
        div.style.display='none';
       }
     }
   }
 }
 
 


function OpenWnd(name, w, h, getHandle)
{
	var wnd = self.open(name, "new"+name.length,
		"width="+w+",height="+h+",status=1,toolbar=0,menubar=0,scrollbars=1,resizable=1");
		
	if (getHandle != null) return wnd;
}


function popUpWin (url, win, width, height, options) {
	var leftPos = (screen.availWidth - width) / 2;
	var topPos = (screen.availHeight - height) / 2;
	options += 'width=' + width + ',height=' + height + ',left=' + leftPos + ',top=' + topPos;
	return window.open(url, win, options);
}


function popUpWin2 (url, win, width, height, options) {
	var leftPos = (screen.availWidth - width) / 2;
	var topPos = (screen.availHeight - height) / 2;
	options += 'width=' + width + ',height=' + height + ',left=' + leftPos + ',top=' + topPos+ ',status=1,toolbar=1,menubar=1,scrollbars=1,resizable=1';
	window.open(url, win, options);
//return 
}



function showalert(url)
{
//alert(url);
	popUpWin2("popup.asp?url="+url, "wind", 600, 400, "");
//	alert(url)
}

