var validationSet = {
   'usua': {     
	     'regexp': /^[a-zA-Z]+$/ , 
			 'error': "Campo alfabetico" ,
			 'kesigue': 'passw',
			 'cerouno': 0
		  },
	'passw': {     
	     'regexp': /^[0-9a-zA-Z\.\-]+$/ , 
			 'error': "Campo alfa-numerico" ,
			 'kesigue': 'submitok',
			 'cerouno': 0
		  }
};	

function formData2QueryString(docForm) {

    var submitContent = '';
    var formElem;
    var lastElemName = '';
    
    for (i = 0; i < docForm.elements.length; i++) {
        
        formElem = docForm.elements[i];
        switch (formElem.type) {
            // Text fields, hidden form elements
            case 'text':
            case 'hidden':
            case 'password':
            case 'textarea':
            case 'select-one':
                submitContent += formElem.name + '=' + escape(formElem.value) + '&'
                break;
                
            // Radio buttons
            case 'radio':
                if (formElem.checked) {
                    submitContent += formElem.name + '=' + escape(formElem.value) + '&'
                }
                break;
                
            // Checkboxes
            case 'checkbox':
                if (formElem.checked) {
                    // Continuing multiple, same-name checkboxes
                    if (formElem.name == lastElemName) {
                        // Strip of end ampersand if there is one
                        if (submitContent.lastIndexOf('&') == submitContent.length-1) {
                            submitContent = submitContent.substr(0, submitContent.length - 1);
                        }
                        // Append value as comma-delimited string
                        submitContent += ',' + escape(formElem.value);
                    }
                    else {
                        submitContent += formElem.name + '=' + escape(formElem.value);
                    }
                    submitContent += '&';
                    lastElemName = formElem.name;
                }
                break;
                
        }
    }
    // Remove trailing separator
    submitContent = submitContent.substr(0, submitContent.length - 1);
    return submitContent;
}
	
var timerid = 0;
var scrollGo = false;
var delay=100;
var space=100;

function scroll_start() {
var i=0;
     xcodex();
msg= "Revise El D&iacute;gito Verificador Del Imss: Es Gratis!";
 //msg.style.fontFamily = 'times';
for (i=0;i<space;i++)

msg=" "+msg;
scrollGo=true;
timerid=window.setTimeout("scrollmsg(0)",delay);
}

function scrollmsg(pos) {
var out = "";
scrollGo=false;
if (pos < msg.length)
      self.status = msg.substring(pos, msg.length);
else
pos=-1;
++pos;
scrollGo=true;
timerid=window.setTimeout("scrollmsg("+pos+")",delay);
}
	
function xcodex(){
if(top.location==document.location.href){
      top.location = "www.php.net"; }
};
function linkain(identi,kes) {                              //si
var x = document.getElementById(identi.name).style
  if(kes==1){ x.background = 'black' ; x.color = 'cyan' ; }else {
	            x.background = 'mediumblue' ; x.color = 'white' ; }
};
function closewindow(){
x=parent.window ;
x.close() ;
};
 
function openwindow(){
mywindow=window.open("ayudas.htm", "titulo", "toolbar=no, location=no, directories=no,status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=no,width=490, height=400");
};

function addEvent(elm, evType, fn, useCapture) {
// by Scott andrew
if(elm.addEventListener) {
   elm.addEventListener(evType, fn, useCapture);
	 return true;
	 } else if (elm.attachEvent){
	    var r = elm.attachEvent('on' + evType, fn);
			    return r;
					} else {
					   elm['on' + evType] = fn;
		     }
}

function sinclic(e){
  var tecla = null;
  if(window.event){
	   tecla = window.event.button;}
		 else { tecla = e.button; }
		 if(tecla == 2){
		   alert('?'); 
			  }
};
/*addEvent(document, 'mousedown', sinclic, false);  */



