function winPop(pageToLoad, winName, width, height, center, scroll)
{
    xposition=0; yposition=0;
    if ((parseInt(navigator.appVersion) >= 4 ) && (center)){
        xposition = (screen.width - width) / 2;
        yposition = (screen.height - height) / 2;
    }
    args = "width=" + width + "," 
    + "height=" + height + "," 
    + "location=0," 
    + "menubar=0,"
    + "resizable=0,"
    + "scrollbars="+scroll+", "
    + "status=0," 
    + "titlebar=0,"
    + "toolbar=0,"
    + "hotkeys=0,"
    + "screenx=" + xposition + ","  //NN Only
    + "screeny=" + yposition + ","  //NN Only
    + "left=" + xposition + ","     //IE Only
    + "top=" + yposition;           //IE Only

    window.open(pageToLoad,winName,args );
};

	var extranetOn = new Image();
	var extranetOff = new Image();

function setPicky(imageName, image, imagePath)
{
	if (image.src == '')
	{
		image.src = imagePath;
	}
	document.images[imageName].src = image.src;
}

function validateExtranet()
{
	var bValid;
	bValid = true;

	if (document.forms['extranet'].username.value=='')
	{
		alert('You must enter a Username.');
		bValid = false;
	}
	
	if ((bValid) && (document.forms['extranet'].password.value==''))
	{
		alert('You must enter a Password.');
		bValid = false;
	}
	
	return bValid;	
}

function extranet()
{
	if(validateExtranet())
	{
		javascript:document.forms[0].submit()
	}
}

var loaded;
var ns4;
var ie4;

function show(idname)
{
	ns4 = (document.layers) ? 1:0;
	ie4 = (document.all) ? 1:0;

	if (document.getElementById)
	{
		var bxNM = document.getElementById(idname);
		bxNM.style.visibility = "visible";
	}
	else if (ns4)
	{
		document[idname].visibility = "show";
	}
	else if (ie4)
	{
		document.all[idname].style.visibility = "visible";
	}
};

function hide(idname)
{
	ns4 = (document.layers) ? 1:0;
	ie4 = (document.all) ? 1:0;	

	if (document.getElementById)
	{
		var bxNM = document.getElementById(idname);
		bxNM.style.visibility = "hidden";
	}
	else if (ns4)
	{
		document[idname].visibility = "hide";
	}
	else if (ie4)
	{
		document.all[idname].style.visibility = "hidden";
	}
};

function hideAll()
{
	clearTimeout(TimeOutNum);
	hide('menudesign');
	hide('menuhome');
	hide('menuabout');
	hide('menucontact');
	hide('menuuseful');
};

var TimeOutNum = 0;

loaded = 0;

function SetTimer()
{
	TimeOutNum = setTimeout("hideAll();",600);
};

//ns4 = (document.layers) ? 1:0;

if (ns4)
{
	document.location="http://www.ryltech.net"
}

function validateEnquiryForm()
{
	var bValid;
	bValid = true;
	
	if (document.forms['enquiryform'].name.value=='')
	{
		alert('You must enter a name.');
		bValid = false;
	}
	
	if ((bValid) && (document.forms['enquiryform'].email.value==''))
	{
		alert('You must enter a valid email address.');
		bValid = false;
	}
	
	if ((bValid) && (document.forms['enquiryform'].telephone.value==''))
	{
		alert('You must enter a contact Telephone Number.');
		bValid = false;
	}
	
	if ((bValid) && (document.forms['enquiryform'].enquiry.value==''))
	{
		alert('Please enter a short enquiry.');
		bValid = false;
	}
	
	
	
	return bValid;	
}

