// ** Status Bar Display **

var kata = 'WWW.CORPORACIONSOMOS.COM';
function dispkata(){
	window.status = kata;
	timerID = setTimeout("dispkata()", 3000);
}
dispkata();



var win = null;
function newWindow(mypage,myname,w,h,features){
	var winl = (screen.width-w)/2;
	var wint = (screen.height-h)/2;
	if(winl < 0) winl = 0;
	if (wint < 0) wint = 0;
	var settings = 'height=' + h + ',';
	settings += 'width=' + w + ',';
	settings += 'top=' + wint + ',';
	settings += 'left=' + winl + ',';
	settings += features;
	win = window.open(mypage,myname,settings);
	win.window.focus();
}

// ** Flip Flop Mouse Hover Link **

hv=0;
currentTag=0;
ua=navigator.userAgent;
v=navigator.appVersion.substring(0,1);
if((ua.lastIndexOf("MSIE") != -1) && (v != '1') && (v != '2') && (v != '3')){
	document.onmouseover=flip; document.onmouseout=flop; window.setInterval(flipflop,250);
}

function flipflop(){
	if(hv=='underline'){
		hv='none'
	}else{
		hv='underline'
	}
	if(currentTag){
		currentTag.style.textDecoration=hv
	}
}

function flip(){
	src=event.toElement;
	if(src.tagName=="A"){
		currentTag=src;
		hv='none';
		src.style.textDecoration=hv;
	}
}

function flop(){
	src=event.fromElement;
	if(src.tagName=="A"){
		currentTag=0;
		hv='underline';
		src.style.textDecoration=hv;
	}
}



function emptyFormElements(theForm, theFieldName, theErrorMsg){
    var isEmpty  = 1;
    var theField = theForm.elements[theFieldName];
    // Whether the replace function (js1.2) is supported or not
    var isRegExp = (typeof(theField.value.replace) != 'undefined');

    if (!isRegExp) {
        isEmpty      = (theField.value == '') ? 1 : 0;
    } else {
        var space_re = new RegExp('\\s+');
        isEmpty      = (theField.value.replace(space_re, '') == '') ? 1 : 0;
    }
    if (isEmpty) {
        theForm.reset();
        theField.select();
        alert(theErrorMsg);
        theField.focus();
        return false;
    }
    return true;
} // end of the 'emptyFormElements()' function
