function goTo(offset){
myForm.offset.value = offset;
myForm.submit();
}

function checkEmailAddress(field) {
var goodEmail = field.value.match(/\b(^(\S+@).+((\.com)|(\.net)|(\.edu)|(\.mil)|(\.gov)|(\.org)|(\..{2,2}))$)\b/gi);
if (goodEmail){
return true;
} else {
alert('Ingresa una direccion de email correcta.\nLa misma no sera publicada')
field.focus()
field.select()
return false;
}
}

function validData(oForm){

if (oForm.name.value.length <1) {
alert('Ingresa tu nombre')
oForm.name.focus()
return;
}

if(!checkEmailAddress(oForm.mail)){
return;
}

if (oForm.security_code.value.length != 5) {
alert('Ingresa el codigo de seguridad correcto')
oForm.security_code.focus()
return;
}

if (oForm.body.value.length <1) {
alert('Vamos hombre, no vas a escribir nada?')
oForm.body.focus()
return;
}

oForm.submit();
}

function validDataResume(oForm){

if (oForm.name.value.length <1) {
alert('Ingresa tu nombre')
oForm.name.focus()
return;
}

if(!checkEmailAddress(oForm.mail)){
return;
}

if (oForm.body.value.length <1) {
alert('Vamos hombre, no vas a escribir nada?')
oForm.body.focus()
return;
}

oForm.submit();
}

function resizeIFrame(oIFrame){
//find the height and width of the internal page
var the_height = oIFrame.contentWindow.document.body.scrollHeight;
var the_width  = oIFrame.contentWindow.document.body.scrollWidth;

//change the height and width of the iframe
oIFrame.height= the_height;
oIFrame.width = the_width;
}

