document.cookie="ancho = "+screen.width+";";

function Myspace(T, C, U)
{
var targetUrl = 'http://www.myspace.com/index.cfm?fuseaction=postto&' + 't=' + encodeURIComponent(T)
 + '&u=' + encodeURIComponent(U)+ '&c=' + encodeURIComponent(C);
window.location = targetUrl;
}

function Facebook(U)
{
var targetUrl = 'http://www.facebook.com/sharer.php?' + 'u=' + encodeURIComponent(U);
window.location = targetUrl;
}

function LiveWindows(T,U)
{
var targetUrl = 'https://favorites.live.com/quickadd.aspx?marklet=1?' + '&url=' + encodeURIComponent(U)
+ '&title=' + encodeURIComponent(T);
window.location = targetUrl;
}

function Twitter(T)
{
var targetUrl = 'http://twitter.com/home?status=' + '' + encodeURIComponent(T);
window.location = targetUrl;
}
function popupcenter(mypage)
{
	var mypage;
	myname="center";
	w = 480;
	h = 360;
	scroller="no";
	resize = "no";
	if(!resize) resize = "yes"
	LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
	TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
	settings =
	'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroller+',resizable='+resize+',status=yes';
	win = window.open(mypage,myname,settings)
}

function trim(stringToTrim) {
	return stringToTrim.replace(/^\s+|\s+$/g,"");
}


function emaile(txt){

	//expresion regular
        var b=/^[^@\s]+@[^@\.\s]+(\.[^@\.\s]+)+$/

        //comentar la siguiente linea si no se desea que aparezca el alert()
        //alert("Email " + (b.test(txt)?"":"no ") + "v�lido.")

        //devuelve verdadero si validacion OK, y falso en caso contrario
        return b.test(txt)
}




function ver_url(formulario) {
    re = /^(file|http):\/\/\S+\.(com|net|org|info|biz|ws|us|tv|cc)\S+$/i

if (re.test(formulario)) {
return true
}
else {

return false
}
}
