// JavaScript Document
function estilo(archivo) {
	document.getElementById('estilo').href=archivo;
}


function redirecciona(url) {
	servidor="http://mophlicartoonning.awardspace.com/";
	estilo=document.getElementById('estilo').href;
	var str3;
	var str=estilo;
	var enc= str.search(/css/);
	var str2 = str.substr(enc+4);
	var almuhadilla = str.search(/\#/);
	if (almuhadilla!=-1){
		window.location.href=servidor+url+"?css="+str2;	
	}else{
		for (i=0; i<str2.length-1; i++){
			str2[i]=str2[i];	
		}
		//alert("Estas en la Hoja de estilos: "+str2);
		window.location.href=servidor+url+"?css="+str2;	
	}
}




function compruebaCSS() {
    var direccion=new String(window.location);
    var variables = direccion.search(/\?/); //Aki ya tenemos las variables en un string
    if (variables!=-1){
      direccion = direccion.substr(variables+1);	//cogemos el string ke keda a partir del ?
      var guardaValorVar=direccion.split(/&/g);
      for (var i=0;i<guardaValorVar.length;i++){
        var tablaParValor=guardaValorVar[i].split(/=/);
		//alert(tablaParValor);
		document.getElementById('estilo').href="css/"+tablaParValor[1];
      }
    }
}