	

function go_to(mod){	
	document.frm_general.module.value=mod
	document.frm_general.submit()
}
		
 
 
function gotNum(s)
  {
	  
	for (i = 0; i < s.length; i++)
    {   
        // Check that current character is number.
        var c = s.charAt(i);
		var contor ="";
        if (((c > "0") && (c < "9")))  contor = "da";
		if (contor == "da") alert ("are digit");
    }
  
 } 
						
function popup (vrr)
		{
			var newPop_elem
			newPop_elem = window.open ('popup.php?id=' + vrr + '','d' , ' scrollbars=no, menubar=yes, height=500, width=602,  resizable=no, toolbar=no, location=no, status=no')
			x = (screen.width-602)/2;
			x = x < 0 ? 0 : x;
			y = (screen.height-560)/2;
			y = y < 0 ? 0 : y;
			newPop_elem.moveTo(x,y);
		}	
		
function popupchat (vrr) {
			var newPop_elem
			newPop_elem = window.open ('chat.php?id_my_messenger=' + vrr + '','d' , 'scrollbars=yes, menubar=yes, height=560, width=800,  resizable=no, toolbar=no, location=no, status=no')
			x = (screen.width-800)/2;
			x = x < 0 ? 0 : x;
			y = (screen.height-660)/2;
			y = y < 0 ? 0 : y;
			newPop_elem.moveTo(x,y);
		}

					
function Trim(s) 
			{
			  // Remove leading spaces and carriage returns
			  
			  while ((s.substring(0,1) == ' ') || (s.substring(0,1) == '\n') || (s.substring(0,1) == '\r'))
			  {
				s = s.substring(1,s.length);
			  }
			
			  // Remove trailing spaces and carriage returns
			
			  while ((s.substring(s.length-1,s.length) == ' ') || (s.substring(s.length-1,s.length) == '\n') || (s.substring(s.length-1,s.length) == '\r'))
			  {
				s = s.substring(0,s.length-1);
			  }
			  return s;
			}				
			


function page_next(pg)
  {
	document.frm_general.page.value=pg
	document.frm_general.submit()
  }

function page_goto(page)
  {
	document.frm_general.page.value=page
	document.frm_general.submit()
  }
  
function newsletter_popup ()
	{
	if(!form_validation_news())
		{
			return;
		}
	var a = document.frm_general;
	var em= a.newsletter.value
	var newPop
	newPop = window.open ('newsletter_popup.php?&em='+em+'','d','scroolbars=no, menubar=no, height=400, width=600, resizable=no, toolbar=no, location=no, status=no')
	
	}		



