window.onload = function() { // Initialize product bar var products = document.getElementById('z_products'); if (products) { products = products.getElementsByTagName('li'); for(var i = 0; i < products.length; i++) { var product = products[i]; product.onmouseover = function() { var div = this.getElementsByTagName('div').item(0); div.className = 'c_hover'; } product.onmouseout = function() { var div = this.getElementsByTagName('div').item(0); div.className = ''; } var div = product.getElementsByTagName('div').item(0); div.onclick = function() { var link = div.getElementsByTagName('a').item(0); document.location.href = link.href; } } } // Initialize left menu var menu = document.getElementById('z_menu_left'); if (menu) { menu = menu.getElementsByTagName('ul').item(0); var lis = menu.getElementsByTagName('li'); for(var i = 0; i < lis.length; i++) { var li = lis[i]; if(li.className == 'c_active') { var sublis = li.getElementsByTagName('li'); if(sublis) { for(var j = 0; j < sublis.length; j++) { var subli = sublis[j]; subli.onmouseover = function() { this.className = 'c_hover'; } subli.onmouseout = function() { this.className = ''; } subli.onclick = function() { document.location.href = this.getElementsByTagName('a').item(0).href; } } } } else { li.onmouseover = function() { this.className = 'c_hover'; } li.onmouseout = function() { this.className = ''; } li.onclick = function() { document.location.href = this.getElementsByTagName('a').item(0).href; } } } } // Initialize index news list var newslists = document.getElementById('z_news_content_list'); if (newslists) { newslists = newslists.getElementsByTagName('div'); for(var i = 0; i < newslists.length; i++) { var newslist = newslists[i]; if(newslist.className != 'clearfloat') { newslist.onmouseover = function() { this.getElementsByTagName('a').item(0).rel = this.className; this.className = this.className == 'c_b2'?'c_hover c_b2':'c_hover'; } newslist.onmouseout = function() { this.className = this.getElementsByTagName('a').item(0).rel; } newslist.onclick = function() { var link = this.getElementsByTagName('a').item(0); document.location.href = link.href; } } } } // Initialize index private news list var privatelists = document.getElementById('z_private_content_list'); if (privatelists) { privatelists = privatelists.getElementsByTagName('div'); for(var i = 0; i < privatelists.length; i++) { var privatelist = privatelists[i]; if(privatelist.className != 'clearfloat') { privatelist.onmouseover = function() { this.getElementsByTagName('a').item(0).rel = this.className; this.className = this.className == 'c_b2'?'c_hover c_b2':'c_hover'; } privatelist.onmouseout = function() { this.className = this.getElementsByTagName('a').item(0).rel; } privatelist.onclick = function() { var link = this.getElementsByTagName('a').item(0); document.location.href = link.href; } } } } // Initialize gallery list var gallerylists = document.getElementById('z_gallery_list'); if (gallerylists) { gallerylists = gallerylists.getElementsByTagName('div'); for(var i = 0; i < gallerylists.length; i++) { var gallerylist = gallerylists[i]; gallerylist.onmouseover = function() { this.getElementsByTagName('a').item(0).rel = this.className; this.className += ' c_active'; } gallerylist.onmouseout = function() { this.className = this.getElementsByTagName('a').item(0).rel; } gallerylist.onclick = function() { var link = this.getElementsByTagName('a').item(0); document.location.href = link.href; } } } // Initialize gallery var galleries = document.getElementById('z_gallery'); if (galleries) { galleries = galleries.getElementsByTagName('div'); for(var i = 0; i < galleries.length; i++) { var gallery = galleries[i]; gallery.onmouseover = function() { this.getElementsByTagName('a').item(0).rel = this.className; this.className += ' c_active'; } gallery.onmouseout = function() { this.className = this.getElementsByTagName('a').item(0).rel; } gallery.onclick = function() { var link = this.getElementsByTagName('a').item(0); document.location.href = link.href; } } } // Initialize sms list var smslists = document.getElementById('z_sms_list'); if (smslists) { smslists = smslists.getElementsByTagName('div'); for(var i = 0; i < smslists.length; i++) { var smslist = smslists[i]; if(smslist.className != 'c_readmore') { smslist.onmouseover = function() { this.className += ' c_active'; } smslist.onmouseout = function() { this.className = 'c_sms_item'; } } } } // Initialize profile list var profilelists = document.getElementById('z_profile_list'); if (profilelists) { profilelists = profilelists.getElementsByTagName('div'); for(var i = 0; i < profilelists.length; i++) { var profilelist = profilelists[i]; if(profilelist.className != 'c_readmore') { profilelist.onmouseover = function() { this.getElementsByTagName('a').item(0).rel = this.className; this.className += ' c_active'; } profilelist.onmouseout = function() { this.className = this.getElementsByTagName('a').item(0).rel; } profilelist.onclick = function() { var link = this.getElementsByTagName('a').item(0); document.location.href = link.href; } } } } // Initialize horse list var horselists = document.getElementById('z_horse_list'); if (horselists) { horselists = horselists.getElementsByTagName('div'); for(var i = 0; i < horselists.length; i++) { var horselist = horselists[i]; if(horselist.className != 'c_readmore') { horselist.onmouseover = function() { this.getElementsByTagName('a').item(0).rel = this.className; this.className += ' c_active'; } horselist.onmouseout = function() { this.className = this.getElementsByTagName('a').item(0).rel; } horselist.onclick = function() { var link = this.getElementsByTagName('a').item(0); document.location.href = link.href; } } } } // Initialize message list var messagelists = document.getElementById('z_message_list'); if (messagelists) { messagelists = messagelists.getElementsByTagName('div'); for(var i = 0; i < messagelists.length; i++) { var messagelist = messagelists[i]; if(messagelist.className != 'c_readmore') { messagelist.onmouseover = function() { this.getElementsByTagName('a').item(0).rel = this.className; this.className += ' c_active'; } messagelist.onmouseout = function() { this.className = this.getElementsByTagName('a').item(0).rel; } messagelist.onclick = function() { var link = this.getElementsByTagName('a').item(0); document.location.href = link.href; } } } } }