function MonthArray() {
this[0] = "Enero"; this[1] = "Febrero"; this[2] = "Marzo"; this[3] = "Abril"; this[4] = "Mayo"; this[5] = "Junio";
this[6] = "Julio"; this[7] = "Agosto"; this[8] = "Septiembre"; this[9] = "Octubre"; this[10] = "Noviembre"; this[11] = "Diciembre";
return (this);
}
function WeekDayArray() {
this[0] = "Domingo"; this[1] = "Lunes"; this[2] = "Martes"; this[3] = "Miércoles"; this[4] = "Jueves"; this[5] = "Viernes";
this[6] = "Sabado";
return (this);
}

function getlongYear(year){
year = d.getYear();
if (year < 1000)
year+=1900;
return year;
}



function writeDate(){
Months = new MonthArray();
WeekDays = new WeekDayArray();
d = new Date();
day = d.getDate();
month = d.getMonth();
year = d.getYear();
wday=d.getDay();

str = WeekDays[wday]+" " +day+ " de " +Months[month] + " de "+getlongYear(year);
document.writeln(str);
}

function newWindow(a_str_windowURL, a_str_windowName, a_int_windowWidth, a_int_windowHeight, a_bool_scrollbars, a_bool_resizable, a_bool_menubar, a_bool_toolbar, a_bool_addressbar, a_bool_statusbar, a_bool_fullscreen) {
  var int_windowLeft = (screen.width - a_int_windowWidth) / 2;
  var int_windowTop = (screen.height - a_int_windowHeight) / 2;
  var str_windowProperties = 'height=' + a_int_windowHeight + ',width=' + a_int_windowWidth + ',top=' + int_windowTop + ',left=' + int_windowLeft + ',scrollbars=' + a_bool_scrollbars + ',resizable=' + a_bool_resizable + ',menubar=' + a_bool_menubar + ',toolbar=' + a_bool_toolbar + ',location=' + a_bool_addressbar + ',statusbar=' + a_bool_statusbar + ',fullscreen=' + a_bool_fullscreen + '';
  var obj_window = window.open(a_str_windowURL, a_str_windowName, str_windowProperties)
    if (parseInt(navigator.appVersion) >= 4) {
      obj_window.window.focus();
    }
}

function leapTo (link) {
var new_url = link;
window.location = new_url;
}


//This Function actually adds the Page to favorites
function bookmarksite(title, url){
if((document.all)&&(!window.opera)){
window.external.AddFavorite(url, title);
}

else if ((typeof window.sidebar == "object") && (typeof window.sidebar.addPanel == "function")){ 
window.sidebar.addPanel(title, url, false)
}
}

function bookmarksite2(title, url,label){
if((document.all)&&(!window.opera)){
window.external.AddFavorite(url, title);
}

else if ((typeof window.sidebar == "object") && (typeof window.sidebar.addPanel == "function")){ 
window.sidebar.addPanel(label, url, "")
}
}

//This Function Writes the Add to Favorites Link
function FavoritesLink(domain,version){
if(version){
var favs_text = ('<IMG SRC="/images/btn_favoritos_fp.jpg" ALT="" WIDTH="131" HEIGHT="17" BORDER="0">');
}
else{
var favs_text = ('<IMG SRC="/images/favs_icon.jpg" ALT="" WIDTH="15" HEIGHT="14" BORDER="0" ALIGN="absmiddle">&nbsp;Add to your <B>Favorites</B>');
}

if((document.all)&&(!window.opera)){//IE
var olink = ('<a href="javascript:void(0);" onclick="javascript:bookmarksite(\'SderotMedia.com\', \'http://\'+domain)">'+favs_text+'</A>');
document.write(olink);
}
else if ((typeof window.sidebar == "object") && (typeof window.sidebar.addPanel == "function")){ 
var olink = ('<a href="javascript:void(0);" onclick="javascript:bookmarksite(\'SderotMedia.com\', \'http://\'+domain+\'/sidebar.html\')">'+favs_text+'</A>');
document.write(olink);
}

else if(window.opera){//Opera
document.write('<A rel="sidebar" HREF="/index.html">'+favs_text+'</A>');
}
//Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en) AppleWebKit/XX (KHTML, like Gecko) Safari/YY
else{document.write('<A HREF="/agregar_favoritos.html">'+favs_text+'</A>');}

}

function FavoritesLink2(domain,txt,title){
favs_text = '<IMG SRC="/images/favs_icon.jpg" ALT="" WIDTH="15" HEIGHT="14" BORDER="0" ALIGN="absmiddle">'+txt;

if((document.all)&&(!window.opera)){//IE
var olink = ('<a href="javascript:void(0);" onclick="javascript:bookmarksite(\'SderotMedia.com - '+title+'\', \'http://\'+domain)">'+favs_text+'</A>');
document.write(olink);
}
else if ((typeof window.sidebar == "object") && (typeof window.sidebar.addPanel == "function")){ 
var olink = ('<a href="javascript:void(0);" onclick="javascript:bookmarksite(\'SderotMedia.com\', \'http://\'+domain+\'/sidebar.html\')">'+favs_text+'</A>');
document.write(olink);
}

else if(window.opera){//Opera
document.write('<A rel="sidebar" HREF="/index.html">'+favs_text+'</A>');
}
//Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en) AppleWebKit/XX (KHTML, like Gecko) Safari/YY
else{document.write('<A HREF="/agregar_favoritos.html">'+favs_text+'</A>');}

}


function SetHomePage(domain,version){

if(version){
var hp_text = ('<IMG SRC="/images/btn_homepage_fp.jpg" ALT="" WIDTH="272" HEIGHT="17" BORDER="0">');
}
else{
var hp_text = ('&nbsp;<IMG SRC="/images/home_icon.jpg" ALT="" WIDTH="15" HEIGHT="14" BORDER="0" ALIGN="absmiddle">&nbsp;Set SderotMedia.com as your <B>Front Page</B>');
}

if((document.all)&&(!window.opera)){
var olink = ('<a name="homePage" id="homePage" href="javascript:void(0);" onclick="this.style.behavior = \'url(#default#homepage)\'; this.setHomePage(document.domain);">'+hp_text+'</A>');
document.write(olink);
}

else if(!window.opera){
var olink = ('<A HREF="http://sderotmedia.com" onclick="showit(event);return false;">'+hp_text+'</A>');
var html = olink;
html += ('<style>');
html += ('#postit{position:absolute;width:350;padding:0px;background-color:#FFFFFF;visibility:hidden;z-index:100;}');
html += ('.dropshadow2{background: url(/images/shadowAlpha.png) no-repeat bottom right !important;background: url(/images/shadow.gif) no-repeat bottom right;margin: 0px 0 0px 0px !important;width: 350px;top:45px;left:15px;padding: 0px;background-color:#FFFFFF;}');
html += ('.innerbox{position:relative;border: 1px solid #999999;bottom:6px;right: 6px;padding:3px;margin: 0px 0px 0px 0px;font-size: 11px;color: #333333; font-family: arial, helvetica, sans-serif;text-decoration: none;background-color:#FFFFFF;}');
html += ('</style>');
html += ('<div id="postit" class="dropshadow2" style="-moz-opacity:.95;">');
html += ('<div class="innerbox" align="left">');
html += ('<div align="right"><b><a href="javascript:closeit()"><IMG SRC="/images/cerrar.gif" ALT="" WIDTH="55" HEIGHT="14" BORDER="0"></a></b></div>');
html += ('<div align="left"><b></b></div>');
html += ('<ol>');
html += ('<li>Drag the logo <a href="http://'+domain+'"><span style="display:inline;position:absolute;background:url(/images/favicon.gif);height:36;width:101px;background-repeat: no-repeat;cursor:move;"></span></a><img src="/images/blnk.gif" alt="" width="101" height="36" border="0"> and drop it over the <IMG SRC="/images/ff_home.gif" ALT="" WIDTH="22" HEIGHT="22" BORDER="0"> icon in your browser\'s nabigation bar.');
html += ('<li>Answer <B>Yes</B> to the question<BR><B>Do you want this document be your new home page?</B>');
html += ('<li>Done!');
html += ('</ol>');
html += ('If this does not work:');
html += ('<ol>');
html += ('<li>Select Tools/Options from your browser\'s navigation bar.');
html += ('<li>Select <B>Main</B>.');
html += ('<li>Make sure the option "Show my home page" be selected in the pull-down labeled as <B>When Firefox starts</B>');
html += ('<li>Type <B>http://'+domain+'</B> in the box labeled as <B>Home Page:</B>');
html += ('</ol>');
html += ('<DIV ALIGN="right"><A HREF="javascript:closeit();">close</A></DIV>');
html += ('</div>');
html += ('</div>');
html += ('<script>crossobj=document.getElementById("postit");');
html += ('var Mozfadedegree=0.10;</script>');
document.write(html);
}
}


function SetHomePage2(domain,title){
if(document.all){
var olink = ('<a name="homePage" id="homePage" href="javascript:void(0);" onclick="this.style.behavior = \'url(#default#homepage)\'; this.setHomePage(document.URL);"><IMG SRC="/images/home_icon.jpg" ALT="" WIDTH="15" HEIGHT="14" BORDER="0" ALIGN="absmiddle">&nbsp;Agregar a P&aacute;gina Inicial / Set as Home Page</a>');
document.write(olink);
}
}



/*Fading Box*/



function closeit(){
mozfadevar=setInterval("mozfadefx()", 90);
}

function showit(evt){
var PosX = evt.clientX;
var PosY = evt.clientY;
var objwidth = crossobj.offsetWidth;

crossobj.style.left = PosX-objwidth+"px";
crossobj.style.top = PosY+20+"px";

crossobj.style.visibility="visible";
//setTimeout('closeit()', 25000);
}

function mozfadefx(){
if (parseFloat(crossobj.style.MozOpacity)>0){
crossobj.style.MozOpacity=parseFloat(crossobj.style.MozOpacity)-Mozfadedegree;
}
if(parseFloat(crossobj.style.MozOpacity) < Mozfadedegree){
crossobj.style.MozOpacity = ".95";
crossobj.style.visibility="hidden";
clearInterval(mozfadevar);
}
}


