function ResetTabs(active)
	{
	document.getElementById('GalleryData').style.display='none';
	document.getElementById('NewImage').style.display='none';
	document.getElementById('ImageList').style.display='none';
	document.getElementById('EditImage').style.display='none';
	document.getElementById('GalleryDataTab').style.color='white';
	document.getElementById('NewImageTab').style.color='white';
	document.getElementById('ImageListTab').style.color='white';
	document.getElementById('EditImageTab').style.color='white';
	document.getElementById(active).style.display='';
	document.getElementById(active+'Tab').style.color='yellow';
	}

function oeffnen(url, width, height, Varname,WindowName,scrollbarsasvar,locationvar) {
	if(WindowName=='')
		WindowName='NewWindow';


	//locationvar='yes';
	if(locationvar==undefined || locationvar=='')
		locationvar='no';

	if(scrollbarsasvar==undefined || scrollbarsasvar=='')
		WindowScrollbars='no';
	else
		WindowScrollbars='yes';
	var win=window.open(url,WindowName,'width=' + width + ',height=' + height + ',resizable=0,scrollbars='+ WindowScrollbars +',location=' + locationvar + ',menubar=no,status=no,left=50,top=50');
}
function openLink(URI){
win = window.open(URI,"secWin","width=800,height=600,left=100,scrollbars=yes,resizable=yes,location=yes");
win.focus;
}


function insertAtCursor(myField, myValue) 
{
//IE support
if (document.selection) 
	{
	myField.focus();
	sel = document.selection.createRange();
	sel.text = myValue;
	}
//MOZILLA/NETSCAPE support
else if (myField.selectionStart || myField.selectionStart == '0') 
	{
	var startPos = myField.selectionStart;
	var endPos = myField.selectionEnd;
	myField.value = myField.value.substring(0, startPos)
	+ myValue
	+ myField.value.substring(endPos, myField.value.length);
	} 
else 
	{
	myField.value += myValue;
	}
}
// calling the function

function EMailc(s){var a = false;var res = false;if(typeof(RegExp) == 'function'){var b = new RegExp('abc');if(b.test('abc') == true){a = true;}} if(a == true){reg = new RegExp('^([a-zA-Z0-9\-\.\_]+)'+'(\@)([a-zA-Z0-9\-\.]+)'+'(\.)([a-zA-Z]{2,4})$');res = (reg.test(s));}else{res = (s.search('@') >= 1 && s.lastIndexOf('.') > s.search('@') && s.lastIndexOf('.') >= s.length-5)} return(res);}




