function numbersonly(myfield, e, dec)
{
	var key;
	var keychar;
	
	if (window.event)
	   key = window.event.keyCode;
	else if (e)
	   key = e.which;
	else
	   return true;
	keychar = String.fromCharCode(key);
	
	// control keys
	if ((key==null) || (key==0) || (key==8) || 
	    (key==9) || (key==13) || (key==27) )
	   return true;
	
	// numbers
	else if ((("0123456789").indexOf(keychar) > -1))
	   return true;
	
	// decimal point jump
	else if (dec && (keychar == "."))
	   {
	   myfield.form.elements[dec].focus();
	   return false;
	   }
	else
	   return false;
}

function delConfirmation(linkName)
{
		if (confirm("Are you sure you want to delete this event ?")==true) {
			location.href = linkName.id
		}	
}

function delConfirmation2(linkName)
{
   var popWindow = window.open("test","Package","width=" + 350 + ",height=" + 150 + ",toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0");
   
   popWindow.document.writeln("<html><head><title>Delete Confirmation</title></head>");
   popWindow.document.writeln("<body topmargin=0 leftmargin=0 marginwidth=0 marginheight=0>");
   popWindow.document.writeln("<table width=\"100%\" height=\"100%\" valign=\"center\" border=0 cellpadding=0 cellspacing=0>");

   popWindow.document.writeln("<tr><td height=\"40%\" valign=\"bottom\" align=\"center\" colspan=\"2\" class=\"BODY_FONT\"><b> Are you sure you want to delete this event? </b></td></tr>");
   popWindow.document.writeln("<tr><td height=\"60%\" valign=\"top\" colspan=\"1\" align=\"center\"><br>  <input type=\"submit\" name=\"TaskDelete\" value=\"Delete\" onClick=\"self.opener.location='"+linkName.id+"'; self.close()\"><input type=\"button\" name=\"TaskClose\" value=\"Cancel\" onClick=\"window.close()\"></td></tr>");

   popWindow.document.writeln("</table>");
   popWindow.document.writeln("</body></html>");
   

}

function goToUrl(vUrl,vFormName)
{
	if (vFormName != "")
	{
	var objForm = eval("document." + vFormName)
	objForm.target = ""
	objForm.action = vUrl
    objForm.submit()
	}
	else
	{
		document.location = vUrl;
	}
}		

function DisplayFlash(file,width,height,Name)
{
	// file - name of the file including path
	// width - width of movie
	// height - height of movie
	// divTagName - id of the div tag encapsulating the flash movie
	// MovieId - id that the object will have
	document.write("<div id='" + Name + "_Div'></div>")
	 
	//DECLARING OBJECT TAG
	var flashObject=document.createElement('object', 'wmode');
	flashObject.setAttribute('id',Name);
	flashObject.setAttribute('type','application/x-shockwave-flash');
	flashObject.setAttribute('data', '');
	flashObject.data=file;
	flashObject.setAttribute('width', '');
	flashObject.width=width;
	flashObject.setAttribute('height','');
	flashObject.setAttribute('wmode', 'transparent'); 
	flashObject.height=height;
			 
			 
			 
	//DECLARING PARAMETERS FOR OBJECT
	// NOTE - other Parameters can be appended to flashObject
	// currently only adding 'movie' param
	var flashParam=document.createElement('param');
	flashParam.setAttribute('name','');
	flashParam.name="movie";
	flashParam.setAttribute('value','');
	flashParam.value=file; 
	
	//****************************************************** 
	//******************************************************
	
	
	flashObject.appendChild(flashParam);
					  
	//SETTING INFORMATION TO DIV TAG
	var tt=document.getElementById(Name + "_Div");
	tt.appendChild(flashObject);
	
	//LOAD MOVIE
	if (document.getElementById) // Only Load for IE 
	{
		var movie = document.getElementById(flashObject.id);

		if (typeof movie.LoadMovie != 'undefined')
		{
			movie.LoadMovie(0,file);
		}
	}      
}





