var DataSelectorDo = true;
var LandSelect = 'closed';
var RegionSelect = 'closed';
var RegionSelector_CurrentCountry = 0;
var NoNotify = false;
var MouseX = 0;
var MouseY = 0;
var clickX = 0;
var clickY = 0;
var MainActiveTab;
var ActiveContent = '';
var TextIsFocused = false;
var CurrentCursor = 0;
var CurrentEmotion = 0;
var EmotionItems = 0;
var EmotionAuto = true;
var ActiveSubmenu= '';
var AllowTabSwitch = false;

function Url(Url) {
	
	if (AllowTabSwitch == false) return;
	var params=document.URL.split('#');
	
	
	document.location = params[0] +'#' + Url;

}

function SlideUp(Element) {
	$("#"+ Element).fadeIn(500);
	
}
function FadeIn(Element) {
	$("#"+ Element).fadeIn(300);
	AllowTabSwitch = true;
}

function EmotionDown(Element) {
	$("#"+ Element).slideDown(1000);	
}
function FadeEmotion(Element) {
	window.setTimeout("EmotionDown('"+ Element + "')",1500);
	window.setTimeout("EmotionEoverLay()",2500);
}

function CacheEmotionOverlay() {
	window.setTimeout("EmotionEoverLay()",500);
}
function FadeInSlow(Element) {
	$("#"+ Element).fadeIn(1000);
}

function SwitchTab(Tab) {
	
	if (Tab == MainActiveTab) return ;
	if (AllowTabSwitch == false) return false;

	// AllowTabSwitch = false;
	MainActiveTab = Tab;
	
	if(Tab.length > 0) {
		for (var i = 0; i < PageTabs.length; ++i) {
			
			document.getElementById('TabSwitch' + PageTabs[i]).className = '';
			// document.getElementById('Tab' + PageTabs[i]).style.display = 'none';
			$("#Tab"+ PageTabs[i]).fadeOut(250);
			if (Tab == PageTabs[i]) {
				var TabNum = i;	
			}
			
		}
		
		document.getElementById('TabSwitch' + Tab).className = 'Active';
		// document.getElementById('Tab' + Tab).style.display = 'inline';
		window.setTimeout("FadeIn('Tab"+ Tab + "')",450);
		Fire = PageTabUrls[TabNum];
		if (Fire) {
			
			Fire = Fire.replace(/###/g,"'");
			eval(Fire);
		}
	}
}

function GetPageLink(Url) {
	
	var params=document.URL.split('#');
	
	params = params[1];
	if (params) {
		c = params.split('/');
		return c[0];
	}  else {
		return '';	
	}
	 

}

function Notification (Key) {
	SendRequest('Notification','GET','ID=' + Key);	
}

function HideNotification() {
	window.setTimeout('DoHideNotification()',4000);
}

function ShowNotification() {
	window.setTimeout('DoShowNotification()',1000);
}
function DoShowNotification() {
	$("#Notification").slideDown(500);	
	
}
function DoHideNotification() {
	//document.getElementById('Notification').className = 'NotificationHide';
	$("#Notification").slideUp(500);	

}

function N() {
	
}

function Get(ID){
	return document.getElementById(ID);
}


function LoadContent(Action,Do,Params,Target) {
	if (ActiveContent != Target) { 
		Obj = Get(ActiveContent);
		if (Obj) { Obj.innerHTML = '';}
		Get(Target).innerHTML = '<div style="margin-top:80px;text-align:center"><img src="http://www.devcon5.cc/images/13/loadbar.gif"></div>';
		SendRequest(Action,Do,Params +'&Target='+ Target);
	}
	ActiveContent = Target;
	
}

function LoadTabContent(Tab,Url) {
	
//	SendRequest();
	
	
}

function LoadGalleryPage(Page,Mode) {
	
	StartItem = (Page * 16) - 16;
	EndItem = StartItem + 16;
	
	
	for (var i = StartItem; i < EndItem; ++i) { 
		if (Get('GalleryItem'+i)) { 
		Get('GalleryItem'+i).innerHTML = '<table class="ImageHolder" cellspacing="0" cellpadding="0"><tr><td><a class="Background" href="image/'+ ImagesIDs[i] +'/' + Mode+ '/"><img class="ImagePolaroid" src="'+  ImagesThumbSRC[i] +'"></a></td></tr></table>';
		}
	}
		
}

function CartDisplay() {
	Get('CartInfo').style.display='block';
	Get('CartInfo').innerHTML = '<div class="FooterButton"><a href="/cart/"><img src="http://www.devcon5.cc/images/14/headlines/warenkorb-title.gif"/><img align="middle" style="margin-bottom: 10px; margin-left: 6px;" src="http://www.devcon5.cc/images/14/icons/cart-a.png"/></a></div>';
}


function DataSelectKill() { 
	DataSelectorDo = false;
}

function DataSelectLaunch(Type,Element,Query,OnClick) {
	if (DataSelectorDo == true) {
		Query = Get('DataSelectorValue_' + Element).value;
		Get('DataSelectorHolder_'+ Element).style.display='block';	
		Get('DataSelectorInnerHolder_'+ Element).innerHTML = '<div style="margin-top:80px;text-align:center"><img src="http://www.devcon5.cc/images/13/loadbar.gif"></div>';
		SendRequest('DataSelector',Type,'Query='+ Query + '&ID='+ Element+'&Country='+ UserCountry + '&Region='+UserRegion+'&OnClick='+OnClick);
		DataSelectorDo = false;
	}
}
function DataSelect(Type,Element,Query,OnClick) {  
	if (Query.length > 1) {
		DataSelectorDo = true;
		window.setTimeout('DataSelectLaunch(\''+ Type+'\',\''+Element+'\',\''+Query+'\',\''+OnClick+'\')',800);
		
	} else {
		Get('DataSelectorHolder_'+ Element).style.display='none';	
	}
}

function DataSelect_Click(Element,ID,Value) {
	Get('DataSelectorHolder_'+ Element).style.display='none';
	Get('DataSelectorValue_' + Element).value = Value;
	Get(Element).value = ID;
	
}

function SelectActiveRegion() {
	Get('SubCountries_'+ UserCountry).style.display = 'block';
	Get('CountrySelectorRegion_'+ UserRegion).style.display = 'block';
	Get('CountrySelectorCountry_'+ UserCountry).style.display = 'block';
	
}

function Land_CLICK_Handle(id) {
	if (LandSelect== 'closed') {
		Land_CLICK_List(id);	
	} else {
		Land_CLICK_Select(id);
	}
}

function Land_CLICK_List(id) {
	LandSelect = 'open';
	Obj = Get('RegionSelectorCountry').childNodes;	
	for (var i = 0; i < Obj.length; ++i) {
		objID = Obj[i].style.display='block';
	}
	RegionSelector_CurrentCountry = id;
 	Region_List(id);
}

function Land_CLICK_Select(id) {
	LandSelect = 'closed';
	Obj = Get('RegionSelectorCountry').childNodes;	
	for (var i = 0; i < Obj.length; ++i) {
		objID = Obj[i].id.replace('CountrySelectorCountry_','');
		
		if (objID != id) {
			// objID = Obj[i].style.display='none';
		}
	}
	
	Region_List(id); 
}

function Region_List(id) {
	RegionSelector_CurrentCountry = id;
	Obj = Get('RegionSelectorCountry').childNodes;	
	for (var i = 0; i < Obj.length; ++i) {
		objID = String(Obj[i].id);
		objID = objID.replace('CountrySelectorCountry_','');
		if (id  == objID) {
			Get('SubCountries_' + objID).style.display = 'block';		
		} else {
			Get('SubCountries_' + objID).style.display = 'none';			
		}
	}
	Region_List_Items(id,0);
}

function Region_List_Items(id) {
	RegionSelect = 'open';
	Obj = Get('SubCountries_' +id + '').childNodes;
	for (var i = 0; i <1; ++i) {
		objID = Obj[i];
		Chil = objID.childNodes; 
		for (var j = 0; j < Chil.length; ++j) {
			o = Chil[j];
			o.style.display='block';
		}
	}
}

function Region_CLICK_Handle(id,country) {
	if (RegionSelect == 'closed') {
		Land_CLICK_List(country);	
	} else {
		Region_CLICK_Select(id);
	}
}

function Region_CLICK_Select(id) {
	RegionSelect = 'closed';
	SendRequest('Main','SwitchRegion','ID='+ id);
	RegionSelector_Reset(id);
	if (Get(RegionSelectField)) {
		Get(RegionSelectField).value = id;
	}
}

function RegionSelector_Reset(id) {
	
	Obj = Get('RegionSelectorCountry').childNodes;	
	for (var i = 0; i < Obj.length; ++i) {
		objID = String(Obj[i].id);
		objID = objID.replace('CountrySelectorCountry_','');
		if (RegionSelector_CurrentCountry  == objID) {
			Get('CountrySelectorCountry_' + objID).style.display = 'block';		
		} else {
			Get('CountrySelectorCountry_' + objID).style.display = 'none';			
		}
	}
	 
	Obj = Get('SubCountries_' +RegionSelector_CurrentCountry + '').childNodes;
	for (var i = 0; i <1; ++i) {
		objID = Obj[i];
		Chil = objID.childNodes; 
		for (var j = 0; j < Chil.length; ++j) {
			objIDX = String(Chil[j].id);
			objIDX = objIDX.replace('CountrySelectorRegion_','');
			if (objIDX != id) {
				o = Chil[j];
				o.style.display='none';
			}
		}
	}
	UserCountry = RegionSelector_CurrentCountry;
	UserRegion = id;
}

function ToggleFriends() {
	if (Get('FriendsBox').style.display=='none') {
		Get('FriendsBox').style.display = 'block';
		NoNotify = true;
	} else {
		Get('FriendsBox').style.display = 'none';
		NoNotify = false;
	}	
}

function ToggleSearch() {
	if (Get('SearchBox').style.display=='none') {
		// Get('SearchBox').style.display = 'block';
	//	$("div").slideDown("slow");
		$("#SearchBox").slideDown(500);
		Get('SearchText').select();
		NoNotify = true;
	} else {
		Get('SearchBox').style.display = 'none';
		NoNotify = false;
	}	
}
 

function findPosLeft(obj) {
	var curleft = curtop = 0;
	if (obj.offsetParent) {
		curleft = obj.offsetLeft
		curtop = obj.offsetTop
		while (obj = obj.offsetParent) {
			curleft += obj.offsetLeft
			curtop += obj.offsetTop
		}
	}
	return curleft;
}
 function findPosTop(obj) {
	var curleft = curtop = 0;
	if (obj.offsetParent) {
		curleft = obj.offsetLeft
		curtop = obj.offsetTop
		while (obj = obj.offsetParent) {
			curleft += obj.offsetLeft
			curtop += obj.offsetTop
		}
	}
	return curtop;
}


function SyncMousePosition() {
	
// Detect if the browser is IE or not.
// If it is not IE, we assume that the browser is NS.
var IE = document.all?true:false

// If NS -- that is, !IE -- then set up for mouse capture
if (!IE) document.captureEvents(Event.MOUSEMOVE)

// Set-up to use getMouseXY function onMouseMove
document.onmousemove = getMouseXY;

// Temporary variables to hold mouse x-y pos.s
var tempX = 0
var tempY = 0

// Main function to retrieve mouse x-y pos.s

function getMouseXY(e) {
  if (IE) { // grab the x-y pos.s if browser is IE
    tempX = event.clientX + document.body.scrollLeft
    tempY = event.clientY + document.body.scrollTop
  } else {  // grab the x-y pos.s if browser is NS
    tempX = e.pageX
    tempY = e.pageY
  }  
  // catch possible negative values in NS4
  if (tempX < 0){tempX = 0}
  if (tempY < 0){tempY = 0}  
  // show the position values in the form named Show
  
  MouseX = tempX;
  MouseY = tempY;
  
  return true
}
}
SyncMousePosition();



///// countdown

 var jahr=2009, monat=11, tag=14, stunde=00, minute=00, sekunde=00;
      var zielDatum=new Date(jahr,monat-1,tag,stunde,minute,sekunde);

      function countdown() {
        startDatum=new Date(); // Aktuelles Datum

        // Countdown berechnen und anzeigen, bis Ziel-Datum erreicht ist
        if(startDatum<zielDatum)  {

          var jahre=0, monate=0, tage=0, stunden=0, minuten=0, sekunden=0;

          // Jahre
          while(startDatum<zielDatum) {
            jahre++;
            startDatum.setFullYear(startDatum.getFullYear()+1);
          }
          startDatum.setFullYear(startDatum.getFullYear()-1);
          jahre--;

          // Monate
          while(startDatum<zielDatum) {
            monate++;
            startDatum.setMonth(startDatum.getMonth()+1);
          }
          startDatum.setMonth(startDatum.getMonth()-1);
          monate--;

          // Tage
          while(startDatum.getTime()+(24*60*60*1000)<zielDatum) {
            tage++;
            startDatum.setTime(startDatum.getTime()+(24*60*60*1000));
          }

          // Stunden
          stunden=Math.floor((zielDatum-startDatum)/(60*60*1000));
          startDatum.setTime(startDatum.getTime()+stunden*60*60*1000);

          // Minuten
          minuten=Math.floor((zielDatum-startDatum)/(60*1000));
          startDatum.setTime(startDatum.getTime()+minuten*60*1000);

          // Sekunden
          sekunden=Math.floor((zielDatum-startDatum)/1000);

          // Anzeige formatieren
          (jahre!=1)?jahre=jahre+" Jahre,  ":jahre=jahre+" Jahr,  ";
          (monate!=1)?monate=monate+" Monate,  ":monate=monate+" Monat,  ";
          (tage!=1)?tage=tage+" Tage,  ":tage=tage+" Tag,  ";
          (stunden!=1)?stunden=stunden+" Stunden,  ":stunden=stunden+" Stunde,  ";
          (minuten!=1)?minuten=minuten+" Minuten  und  ":minuten=minuten+" Minute  und  ";
          if(sekunden<10) sekunden="0"+sekunden;
          (sekunden!=1)?sekunden=sekunden+" Sekunden":sekunden=sekunden+" Sekunde";

          Get('CountDown').innerHTML = '<a href="dreizehn">' + monate+tage+stunden+minuten+sekunden + '</a>';

          setTimeout('countdown()',200);
        }
        // Anderenfalls alles auf Null setzen
        else  Get('CountDown').innerHTML = '<a href="dreizehn">Willkommen bei DEVCON5 Network - Version 13</a>';
      }


function CheckQueue() {
	SendRequest('Queue','Check','');
	window.setTimeout("CheckQueue()",10000);
}

function TimeoutQueueInfo() {
	window.setTimeout("QueueInfo()",10000);
}

function QueueInfo() {
	SendRequest('Queue','Check',''); 
}

function Submit(Form,Ajax) {
	
	
	CheckFields = eval('RequiredFields' + Form);
	AjaxFields = eval('AjaxFields' + Form);
	


	Do = true;
	
	Focused = false;
	for (var i = 0; i < CheckFields.length; ++i) {
		if (Get(CheckFields[i]))  {
			Type = typeof(Get(CheckFields[i]));
			Value = Get(CheckFields[i]).value;
			Get(CheckFields[i]).style.backgroundColor = '#000000';
			Get(CheckFields[i]).style.backgroundImage  = "url('http://www.devcon5.cc/images/14/icons/grad.png')";
			
			if (Value.length < 1) {
				Do = false;
				Get(CheckFields[i]).style.backgroundColor = '#ff0000';
				Get(CheckFields[i]).style.backgroundImage  = "url('')";
				if (Focused == false) {
					Get(CheckFields[i]).focus();
					Focused = true;
				}
				
			}
			
		}
	}
	
	if (Do == false) {
		Notification('Form-Error');
	} else {
		if (Ajax == true) {
		
			RequestString = '';
			BaseAjax = Get('BaseAjax');
			
			if(BaseAjax) {
				RequestString = BaseAjax.value;
			}
			
			for (var i = 0; i < AjaxFields.length; ++i) {						
				value = Get(AjaxFields[i]);
				if(value) {
					RequestString = RequestString + '&' + AjaxFields[i] + '=' + value.value;
				}
			}
			Action =  Get(Form +'-Action').value;
			Do = Get(Form+'-Do').value;
			
			SendRequest(Action,Do,RequestString,true);
			
		
			
			
		} else {
			//alert('ok');
			Get(Form).submit();		
		}	
	}
	
	


} 

function getKeyCode(e) {
	if(window.event) {
		keynum = e.keyCode;
	}
		else if(e.which) 	{
			keynum = e.which;
	}
	 return keynum;
}

function ToggleMessageBar() {
	if (Get('MessageBar').style.display == 'none'){
	//	Get('MessageBar').style.display = 'block';
		Status = 'block';
		$("#MessageBar").slideDown(500);
	} else {
		$("#MessageBar").slideUp(500);
		Status = 'none';
	}
	SendRequest('Message','SetMessageBar','ID=' + Status);
}

function ToggleSubBox(suffix,count,active) {
	for (var i = 1; i <= count; ++i) {
			if (!Get(suffix +'-'+i)) continue;
			if (!Get(suffix +'-button-'+i)) continue;
 
		if (active == i) {
					 
			Get(suffix +'-'+i).style.display = 'block';
			Get(suffix +'-button-' + i).className = 'ButtonBPagingActive';
		} else {
			Get(suffix +'-'+i).style.display = 'none';	
			Get(suffix +'-button-' + i).className = 'ButtonBPaging';
		}
	}
}

function Redirect(URL) {
	location.href=URL;	
} 

function ConfirmedRedirect(URL) {
	if (confirm('Aktion sicher ausfuehren?')) {
		location.href=URL;		
	}
}

function AppendTextFocus() {
	
	for(var i=0, df=document.forms, len=df.length; i<len; i++) {
 		for(j=0, els=df[i].elements; j<els.length; j++) {
  			if ( /^text/.test( els[j].type )) {
				els[j].onfocus = SetFocus;
				els[j].onblur = BlurFocus;	
			}
			if ( /^input/.test( els[j].type )) {
				els[j].onfocus = SetFocus;
				els[j].onblur = BlurFocus;	
			}
		}
	}
	
	//alert(document.currentFocus);
}

function GetFocused() {
	return TextIsFocused;
}
function SetFocus() {
	TextIsFocused = true;
}

function BlurFocus() {
	TextIsFocused = false;
}

function Help() {
	Redirect('help/page-'+ Page);	
}

function ToggleElements(A,B) {
	
	if (Get(A).style.display == 'none') {
		Get(A).style.display = 'block';	
		Get(B).style.display = 'none';	
	}	else {
		Get(A).style.display = 'none';	
		Get(B).style.display = 'block';	
		
	}
}

function CloseOverlay() {
	Get('OverlayWindow').className = 'Hide';
	Get('OverlayContent').className = 'Hide';
	
}

function FindPersons(Value) {
	Value = Value.toLowerCase()
	Obj = Get('LinkList').childNodes;	
	for (var i = 0; i < Obj.length; ++i) {
		
		
		Ob = Obj[i].id;
		Oba = Ob;
		Ob = 'X' + Ob;
		NodeValue = Get(Ob).innerHTML.toLowerCase();
		
		
		//Get('User' + Obj[i]).style.display = 'block';
		
		if (NodeValue.indexOf(Value) != -1) {
			Get(Ob).style.display = 'block';
		} else {
		//Get('User' + Obj[i]).style.display = 'none';
			Get(Ob).style.display = 'none';
		}
		
		
	}
}

function Handle_Event_KEYDOWN(Ereignis) {
  if (!Ereignis)
    Ereignis = window.event;
	// EEENTER
	if (Ereignis.keyCode == 13) { 
		if (CurrentCursor == 'Message') {
			SendPrivateMessage(CurrentConversation);	
		}
	}
	
}

function SetCursor(Zone) {
	CurrentCursor = Zone;	
}

function UnSetCursor() {
	CurrentCursor = 0;	
	
}

function SlideEmotion(Items) {
	CurrentEmotion = 0;
	EmotionItems = Items;
	// EmotionEoverLay();
	window.setTimeout('SlideEmotionNext()',8500);
}
function SlideEmotionNext() {
	// Get('EmotionSub'+CurrentEmotion).style.display = 'none';
	if (EmotionAuto == true) {
		$("#EmotionSub"+ CurrentEmotion).fadeOut(800);
		CurrentEmotion++;
		if (CurrentEmotion >=  EmotionItems) {
			CurrentEmotion  = 0;
		}
		window.setTimeout('EmotionEoverLay()',750);;
	//	Get('EmotionSub'+CurrentEmotion).style.display = 'block';
		window.setTimeout('FadeInSlow(\'EmotionSub\'+CurrentEmotion)',850);
		window.setTimeout('SlideEmotionNext()',8000);
	}
	
}

function SlideEmotionForce(Item) {
	if (Item != CurrentEmotion) {
		$("#EmotionSub"+ CurrentEmotion).fadeOut(800);
		window.setTimeout('FadeInSlow(\'EmotionSub\'+CurrentEmotion)',800);
		CurrentEmotion = Item;
		EmotionEoverLay();

		
	}
	EmotionAuto = false;
}

function EmotionEoverLay() {
	pTop = findPosTop(Get('Emotion'));
	pLeft = findPosLeft(Get('Emotion'))
	
	
	Get('EmotionOverlay').className = 'EmotionOverlayHolder';
	Get('EmotionOverlay').style.display = 'block';
	Get('EmotionOverlay').style.position = 'absolute';
	Get('EmotionOverlay').style.left = parseInt(pLeft) +'px';
	Get('EmotionOverlay').style.top = parseInt(pTop) + 240 +'px';
	var InnerHTML = '<div class="Right">';
	for (i=0;i<EmotionItems;i++) {
		Display = i+1;
		Active = '';
		if (i == CurrentEmotion) {
			Active = 'Active';
		}
		InnerHTML = InnerHTML + '<div onclick="javascript:SlideEmotionForce('+ i +')" style="cursor:pointer" class="BoxHolder'+ Active +'"><div class="Inner">'+ Display +'</div></div>';
	}   
	InnerHTML = InnerHTML + '<div class="Clear"></div></div><div class="Clear"></div>';
	Get('EmotionOverlay').innerHTML = InnerHTML;
	
	
}

document.onkeydown = Handle_Event_KEYDOWN;


function ShowSubMenu(Wich) {
	
	PosTop = findPosTop(Get('Menu'+ Wich));
	PosLeft= findPosLeft(Get('Menu'+ Wich));
	
	Get('SubMenu'+Wich).style.position = 'absolute';
	Get('SubMenu'+Wich).style.left = (parseInt(PosLeft) + 0) + 'px';
	Get('SubMenu'+Wich).style.top  = (parseInt(PosTop) + 18) + 'px';
	Get('SubMenu'+Wich).style.display = 'block';
	ActiveSubmenu = Wich;
	EmotionAuto = false;
}

function HideSubMenu() {
	Get('SubMenuEvents').style.display = 'none';
	EmotionAuto = true;
}

function StopEmotion() { 
	EmotionAuto = false;	
}

var CurrentSelectedUser = Array();
var PreviousSuffix = '';

function SelectFriend(ID,Suffix) {
	if (PreviousSuffix != Suffix) {
		PreviousSuffix = Suffix;
		CurrentSelectedUser = Array();
	}
	Box = Get('UserSelectBox'+ ID + '_' + Suffix);
	if (Box.className == 'UserBoxDarked') {
		Box.className = 'UserBoxChecked';
		CurrentSelectedUser[ID] = ID;
		Get('UserBoxChechbox'+ID+ '_' + Suffix).style.display = 'block';
	} else {
		Box.className = 'UserBoxDarked';
		CurrentSelectedUser[ID] = 0;
		Get('UserBoxChechbox'+ID+ '_' + Suffix).style.display = 'none';
	}
	UpdateUserField(Suffix);
}


function UpdateUserField(Suffix) { 
	var Value = '';
	var Comma = '';
	for (var i = 0; i < CurrentSelectedUser.length; ++i) {
		if (CurrentSelectedUser[i] > 0) {
			Value = Value + Comma + CurrentSelectedUser[i];
			Comma = ';';
		}
	}
	Get('SelectedUsers_'+ Suffix).value = Value;
	
}


function checkdate(input){
var validformat = ValidDateFormat;
var returnval=false
if (!validformat.test(input.value)) {

	// alert("Invalid Date Format. Please correct and submit again.")

} else{ //Detailed check for valid date ranges
var monthfield=input.value.split(DateDelimiter)[CheckDateMonthField] ;
var dayfield=input.value.split(DateDelimiter)[CheckDateDayField];
var yearfield=input.value.split(DateDelimiter)[CheckDateYearField]; 
var dayobj = new Date(yearfield, monthfield-1, dayfield)
if ((dayobj.getMonth()+1!=monthfield)||(dayobj.getDate()!=dayfield)||(dayobj.getFullYear()!=yearfield)) {
	// alert("Invalid Day, Month, or Year range detected. Please correct and submit again.")
}
else
returnval=true
}
if (returnval==false) input.select()
return returnval
}
