function clearform(link){
window.parent.location = link
}

function sbmForm(form,url){
form.target = "_self";
form.action = url
form.submit()
return true
}

function deleteThis(form,who)
{
if (who.length == 0) who = "record"
if ( confirm("Sure you want to delete this " + who + "?")) 
	{
	form.submit()
	return true
	}
else 
	return false 
}

function winPrint( target, height, width )
	{
			eval( "window.open( '" + target + "', 'win2', 'height=" + height + ",width=" + width + ",location=no,menubar=yes,scrollbars=yes,status=no,toolbar=no,resizable=yes,titlebar=yes' )" );
			window.print;
	}

function adWin(loc)
{
	sBrowser = navigator.appName;
	sVersion = parseInt(navigator.appVersion);
	sDetail = navigator.userAgent;
	sBrowVer = null;
	y = (screen.availHeight)/2.5;
	x = (screen.availWidth)/4;
	
	//=============================================================
	if (sBrowser == "Netscape")
	{
		if (sVersion == 2)
		{
			sBrowVer = "Net2"
		}
		else if (sVersion >= 3 && sVersion < 4)
		{
			sBrowVer = "Net3"
		}
		else if (sVersion >= 4)
		{
			sBrowVer = "Net4"
		}
	}
	else if (sBrowser == "Microsoft Internet Explorer")
	{
		if (sVersion >= 2 && sVersion <= 3)
		{
			if (sDetail.indexOf("3.") != -1)
			{
				sBrowVer = "IE3"
			}
			else
			{
				sBrowVer = "IE2"
			}
		}
		else if (sVersion >= 4)
		{
			sBrowVer = "IE4"
		}
	}
//========================================================
	  if (sBrowVer =="Net2" ||sBrowVer=="Net3"){NewWindow=window.open("", "adWIN","height=300,width=400,screenX="+x+",left="+x+",screenY="+y+",top="+y+",alwaysRaised=0,dependent=1,directories=0,fullscreen=0,location=0,menubar=0,resizable=1,scrollbars=0,status=0,toolbar=0");
		NewWindow.location.href = loc;
		if(sBrowVer == "Net3")
		{
			NewWindow.focus()
		}
	}
//=======================================================
	  if(sBrowVer=="Net4"){NewWindow=window.open("", "adWIN","height=300,width=400,screenX="+x+",left="+x+",screenY="+y+",top="+y+",alwaysRaised=0,dependent=1,directories=0,fullscreen=0,location=0,menubar=0,resizable=1,scrollbars=0,status=0,toolbar=0");
		NewWindow.location.href = loc;
		NewWindow.focus()
	}
//========================================================
	  if(sBrowVer=="IE3"){win=window.open('','adWIN','width=400,height=300,screenX="+x+",left="+x+",screenY="+y+",top="+y+",dependent=1,directories=0,fullscreen=0,location=0,menubar=0,channelmode=0,resizable=1,scrollbars=0,status=0,toolbar=0"');
  		if (win != null)
		{
     		if (win.opener == null)
			{
        		win.opener = self;
     		}
    		win.location.href = loc;
   		}
	}
//=======================================================
	  if(sBrowVer=="IE4"){NewWindow=  window.open("", "adWIN","height=300,width=400,screenX="+x+",left="+x+",screenY="+y+",top="+y+",dependent=1,directories=0,fullscreen=0,location=0,menubar=0,channelmode=0,resizable=1,scrollbars=0,status=0,toolbar = 0");  
	
		NewWindow.location.href=  loc; } if(sBrowVer==null){NewWindow=window.open("", "adWIN","height=250,width=400,screenX="+x+",left="+x+",screenY="+y+",top="+y+",dependent=1,directories=0,fullscreen=0,location=0,menubar=0,channelmode=0,resizable=1,scrollbars=0,status=0,toolbar=0");
		NewWindow.location.href = loc;
	}
	return true
}