<!--


function ChkNumber(FieldName)
	{

	// only allow numbers to be entered
	var checkOK = "0123456789";
	var checkStr = FieldName.value;
	var allValid = true;
	var allNum = "";
	for (i = 0;  i < checkStr.length;  i++)
		{
		ch = checkStr.charAt(i);
		for (j = 0;  j < checkOK.length;  j++)
		if (ch == checkOK.charAt(j))
			break;
		if (j == checkOK.length)
			{
			allValid = false;
			break;
			}
		if (ch != ",")
		allNum += ch;
		}

		if (!allValid)
			{
			alert("Only numbers allowed in this field.");
			FieldName.focus();
			return (false);
			}
	}

function Confirm()
	{
		window.opener.location.reload();
		self.close();
	}

function ConfirmContinue()
	{
	var agree=confirm("Do you want to add another?");
	if (agree)
		return true ;
	else
		window.opener.location.reload();
		self.close();
	}

function ConfirmChange()
	{
	var agree=confirm("Changes are made. Press OK to make another change or Cancel to close this window!!!");
	if (agree)
		return true ;
	else
		window.opener.location.reload();
		self.close();
	}

function ConfirmDelete()
	{
	var agree=confirm("Are you sure about this?");
	if (agree)
		return true ;
	else
		return false ;
	}

function ConfirmEdit()
	{
	var agree=confirm("Are you sure about the changes?");
	if (agree)
		return true ;
	else
		return false ;
	}

function ConfirmMove()
	{
	var agree=confirm("Är du säker på att du vill flytta denna artikel?");
	if (agree)
		return true ;
	else
		history.back(-1);
		return false ;
	}

function ConfirmNotInUse()
	{
	alert("Denna funktion är inte aktiverad!!!");
	}

function ConfirmPMDelete(strURL)
	{
	var agree=confirm("Are you sure about this?");
	if (agree)
		window.open(strURL, 'PMDelete', 'width=560,height=440,top=30,left=5, toolbar=no,directories=no,status=no,scrollbars=no,resizable=1,resize=no,menubar=no');
	else
		return false;
	}


function changepost(URL)
	{
	window.location = URL;
	}

function reload()
	{
	window.location.reload();
	}

function FormEdit(strForm, strTarget)
	{
	// alter the action and submit the form
	document.strForm.action = "strTarget";
	document.strForm.submit();
	}


function NewWindow(url, name, features)
        {
        window.open(url, name, features);
        }

function openwin(url,win_name,win_width,win_height)
	{
	var iMyWidth;
	var iMyHeight;
	iMyWidth = (window.screen.width/2) - (win_width/2 + 10); //(screen width)/2-(new window width)/2 (plus 5 pixel borders).
	iMyHeight = (window.screen.height/2) - (win_height/2 + 50); //(screen height)/2-(new window height)/2 (plus title and status bars).
	var win2 = window.open(url,win_name,"height="+win_height+",width="+win_width+",resizable=no,left=" + iMyWidth + ",top=" + iMyHeight + ",screenX=" + iMyWidth + ",screenY=" + iMyHeight + ",scrollbars=no");
	win2.focus(); 
	}

function OpenStartUrl()
	{
		window.opener.location="http://poker.vcfrontline.com";
		self.close();
	}


function ConfirmNewUser()
	{
		alert("Your user has been succesfully created, try to login to see if it works. Proper rights will be set by an administrator!!!");
		window.opener.location.reload();
		self.close();
	}

//-->

