Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var sign;
- var pietra;
- var filepath;
- // function to extract the actual zodiacal period
- function getPeriod()
- {
- var oggi = new Date();
- var gior = oggi.getDate().toString();
- var mese = (oggi.getMonth() + 1).toString();
- var anno = oggi.getFullYear().toString();
- var data = anno + ( mese.length < 2 ? "0" : "" ) + mese + ( gior.length < 2 ? "0" : "" ) + gior;
- if ( parseInt( data ) >= parseInt( anno + "0320" ) && parseInt( data ) <= parseInt( anno + "0420" ) ) { // dal 20 marzo al 20 aprile
- document.write("dell'Ariete " ); sign = 0; pietra = "il Diaspro rosso"; filepath = "Pietre_ariete.htm";
- }
- if ( parseInt( data ) >= parseInt( anno + "0421" ) && parseInt( data ) <= parseInt( anno + "0519" ) ) { // dal 21 aprile al 19 maggio
- document.write(" del Toro" ); sign = 1; pietra = "il Quarzo rosa"; filepath = "Pietre_toro.htm";
- }
- if ( parseInt( data ) >= parseInt( anno + "0520" ) && parseInt( data ) <= parseInt( anno + "0621" ) ) { // dal 20 maggio al 21 giugno
- document.write("dei Gemelli" ); sign = 2; pietra = "l´Occhio di tigre"; filepath = "Pietre_gemelli.htm";
- }
- if ( parseInt( data ) >= parseInt( anno + "0622" ) && parseInt( data ) <= parseInt( anno + "0722" ) ) { // dal 22 giugno al 22 luglio
- document.write("del Cancro"); sign = 3; pietra = "la Pietra di Luna"; filepath = "Pietre_cancro.htm";
- }
- if ( parseInt( data ) >= parseInt( anno + "0723" ) && parseInt( data ) <= parseInt( anno + "0822" ) ) { // dal 23 luglio al 22 agosto
- document.write("del Leone"); sign = 4; pietra = "il Cristallo di rocca"; filepath = "Pietre_leone.htm";
- }
- if ( parseInt( data ) >= parseInt( anno + "0823" ) && parseInt( data ) <= parseInt( anno + "0923" ) ) { // dal 23 agosto al 23 settembre
- document.write("della Vergine"); sign = 5; pietra = "l´Amazzonite"; filepath = "Pietre_vergine.htm";
- }
- if ( parseInt( data ) >= parseInt( anno + "0924" ) && parseInt( data ) <= parseInt( anno + "1022" ) ) { // dal 24 settembre al 22 ottobre
- document.write("della Bilancia"); sign = 6; pietra = "la Giada"; filepath = "Pietre_bilancia.htm";
- }
- if ( parseInt( data ) >= parseInt( anno + "1023" ) && parseInt( data ) <= parseInt( anno + "1121" ) ) { // dal 23 ottobre al 21 novembre
- document.write("dello Scorpione"); sign = 7; pietra = "il Quarzo tormalinato"; filepath = "Pietre_scorpione.htm";
- }
- if ( parseInt( data ) >= parseInt( anno + "1122" ) && parseInt( data ) <= parseInt( anno + "1221" ) ) { // dal 22 novembre al 21 dicembre
- document.write("del Sagittario"); sign = 8; pietra = "la Malachite"; filepath = "Pietre_sagittario.htm";
- }
- if ( parseInt( data ) >= parseInt( anno + "1222" ) && parseInt( data ) <= parseInt( anno + "3112" ) ) { // dal 22 dicembre al 31 dicembre,
- document.write("del Capricorno"); sign = 9; pietra = "l´Ossidiana"; filepath = "Pietre_capricorno.htm";
- }
- if ( parseInt( data ) >= parseInt( anno + "0101" ) && parseInt( data ) <= parseInt( anno + "0120" ) ) { // dal 1° gennaio al 20 gennaio
- document.write("del Capricorno"); sign = 9; pietra = "l´Ossidiana"; filepath = "Pietre_capricorno.htm";
- }
- if ( parseInt( data ) >= parseInt( anno + "0121" ) && parseInt( data ) <= parseInt( anno + "0219" ) ) { // dal 21 gennaio al 19 febbraio
- document.write("dell'Acquario"); sign = 10; pietra = "il Lapislazzuli"; filepath = "Pietre_acquario.htm";
- }
- if ( parseInt( data ) >= parseInt( anno + "0220" ) && parseInt( data ) <= parseInt( anno + "0319" ) ) { // dal 20 febbraio al 19 marzo
- document.write("dei Pesci"); sign = 11; pietra = "l´Ametista"; filepath = "Pietre_pesci.htm";
- }
- }
- // define array with all zodiacal stones used
- function apri(conta) {
- nuovo=new Array("wp-content/themes/catch-evolution-child/images/diaspro_rosso_ariete.png",
- "wp-content/themes/catch-evolution-child/images/quarzo_rosa_toro.png",
- "wp-content/themes/catch-evolution-child/images/occhio_di_tigre_gemelli.png",
- "wp-content/themes/catch-evolution-child/images/pietre_di_luna_cancro.png",
- "wp-content/themes/catch-evolution-child/images/cristallo_di_rocca_leone.png",
- "wp-content/themes/catch-evolution-child/images/amazzonite_vergine.png",
- "wp-content/themes/catch-evolution-child/images/giada_bilancia.png",
- "wp-content/themes/catch-evolution-child/images/quarzotormalinato_scorpione.png",
- "wp-content/themes/catch-evolution-child/images/malachite_sagittario.png",
- "wp-content/themes/catch-evolution-child/images/ossidiana_capricorno.png",
- "wp-content/themes/catch-evolution-child/images/lapislazzulo_acquario.png",
- "wp-content/themes/catch-evolution-child/images/ametista_pesci.png")
- document.galle.src=nuovo[conta]
- }
- // Function to start the JS into the home page of the site
- function avvia() {
- apri(sign)
- }
- //Function to extract the corresponding zodiacal stone
- function getStone() {
- stone= pietra;
- document.write(stone);
- }
- // function for the assembling of the href statement to display the image and the corresponding file path pointing on a html page which contains more information about stones of this zodiacal sign
- function getLink() {
- document.write('<a href='+ filepath + '>');
- document.write('<img src="" name="galle" class="pietra" height=92 width=123/>');
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement