﻿function on(img)
{
	document.images[img].src = eval(img + "1.src");
}
function off(img)
{
	document.images[img].src = eval(img + ".src");
}

function popUp(page)
{
	window.open(page,"","width=666 height=500,scrollbars=yes,menubar=no,resizable=yes");
}

function tellFriendPopUp(page)
{
	window.open(page,"","width=700 height=500,scrollbars=no,menubar=no,resizable=no");
}

function miPopUp(page)
{
	window.open(page,"","width=400 height=250,scrollbars=no,menubar=no,resizable=no");
}

function clickButtonOnEnter(event, buttonID)
{
	if ((event.which ? event.which : event.keyCode) == 13)
	{
		event.returnValue = false;
		event.cancel = true;
		document.getElementById(buttonID).click();
	}
}
function goTo(page)
{
	location.href=page;
}
function openModal(sAdress)
{
	var sFeatures = "dialogHeight:200px; dialogWidth:300px; center: yes; edge: raised; help: no; status: no; resizable: yes; dialogHide: yes; scroll: no; unadorned: yes;";
	window.showModalDialog(sAdress,sAdress,sFeatures);
	location.href+='';
}
function checkLen(textArea,maxLength)
{
	if(textArea.value.length > maxLength)
	{
		textArea.value = textArea.value.substring(0,maxLength);
	}
}
