﻿//begin va
var obj;
var sIdTS, sNameTS, sPathTS;
var arItemTS = new Array()
var sLink = '0.xml';

var FolderId = RelatedFolder;
var DelayId;
var t, t1, t2;
var MNSStemp = 'MNSS1';
var indexPicItem = 0;
var maxindexPicItem = 0;
var arrItempic = new Array();
var autochangepic;
var rightOpacity1 = 1;
var rightOpacity2 = 100;
var flagOtherFolder = true;
var sLoDID = ',', sDate = '';
var strLinkImg = "http://sohoa.vnexpress.net/images/menu/menu1000.gif";

//end var

function changeSearch(id) {
    document.getElementById(MNSStemp).style.fontWeight = 'normal';
    document.getElementById(id).style.fontWeight = 'bold';
    MNSStemp = id;
    document.getElementById('MNSubSearch').style.display = 'none';
}
function setDelayHiddenDiv(div, time) {
    if (t2 != null) {
        clearTimeout(t2);
        t2 = setTimeout('hiddenDiv("' + div + '")', time);
    }
    else
        t2 = setTimeout('hiddenDiv("' + div + '")', time);
}
function hiddenDiv(div) {

    document.getElementById(div).style.display = 'none';
}
function displayDiv(div) {
    document.getElementById(div).style.display = 'block';
}
function createHTML2(arItemTS, div1, div2, div3) {
    document.getElementById(div1).innerHTML = '<img src="' + arItemTS[0][1] + arItemTS[0][4] + '" class="SHimg" alt="' + arItemTS[0][2] + '" onclick="location.href=\'' + arItemTS[0][1] + '\'" />';
    document.getElementById(div2).innerHTML = '<div onclick="location.href=\'' + arItemTS[0][1] + '\'" class="SH1">' + arItemTS[0][2] + '</div>' + '<div class="SH2">' + arItemTS[0][3] + '</div>';
    document.getElementById(div3).innerHTML = '<div onclick="location.href=\'' + arItemTS[1][1] + '\'" class="SH3"><div class="SH4"><img src="http://sohoa.vnexpress.net/images/newhome/nh9.gif" /></div>&nbsp;' + arItemTS[1][2] + '</div>' + '<div onclick="location.href=\'' + arItemTS[2][1] + '\'" class="SH5"><div class="SH4"><img src="http://sohoa.vnexpress.net/images/newhome/nh9.gif" /></div>&nbsp;' + arItemTS[2][2] + '</div>';
}



function setFolderDefault() {
    if (FolderId == 10000) {
        FolderId = 1;
        flagOtherFolder = false;
       
    } else if (FolderId != 2 && FolderId != 3 && FolderId != 4 && FolderId != 5 && FolderId != 6 && FolderId != 7 && FolderId != 8 && FolderId != 9 && FolderId != 10) {
        FolderId = 1;
        flagOtherFolder = false;
    }
    document.getElementById(FolderId).className = 'menuActive' + FolderId + '_' + FolderId;
    writeSubmenu(FolderId);
}

function writeSubmenu(id) {
    //alert(id);

       if (id == 1) {
   //home
    document.getElementById("subMenu").innerHTML = "<div style='color:#848484;font-style:Arial;margin-top:-1px;'><img src='http://sohoa.vnexpress.net/images/menu/iconPhone.gif'  align=absmiddle' style='margin'/><a href='http://kontactr.com/user/loveiu'> Liên hệ &nbsp;</a> <img src='http://sohoa.vnexpress.net/images/menu/iconMenu.gif' align='top'  style='margin' style='margin-top:-2px' /> <a href='http://kontactr.com/user/loveiu'>Quảng cáo &nbsp;</a> <img src='http://i342.photobucket.com/albums/o433/bkprobk/rss-ico.gif' align='top'  style='margin' style='margin-top:-2px' /> <a href='http://feeds.feedburner.com/loveiu'> RSS</a></div>";

    document.getElementById("subMenu").style.marginLeft = "-5px";
    DelayId = id;
    }

    else if (id == 2) {
//menu1
        document.getElementById("subMenu").innerHTML = "<a class='aSubMenu' href='http://hot.loveiu.net/search/label/Scandal%20-%20Shocking#'> Sock HoT </a> &nbsp; <img src='" + strLinkImg + "' /> &nbsp;<a class='aSubMenu' href='http://hot.loveiu.net/search/label/%E1%BA%A2nh%20S%E1%BB%91c#'> &#7842;nh Sock </a>&nbsp; <img src='" + strLinkImg + "' /> &nbsp;<a class='aSubMenu' href='http://hot.loveiu.net/search/label/VideoClip%20-%20Sock#'> Clip Sock </a> &nbsp; <img src='" + strLinkImg + "' /> &nbsp;<a class='aSubMenu' href='http://hot.loveiu.net/search/label/%E1%BA%A2nh%20%C4%90%E1%BB%99c%20-%20Ngh%E1%BB%87%20Thu%E1%BA%ADt#'> &#7842;nh &#272;&#7897;c </a> &nbsp; <img src='" + strLinkImg + "' /> &nbsp;<a class='aSubMenu' href='http://hot.loveiu.net/search/label/Ph%C3%A1p%20Lu%E1%BA%ADt#'> Ph&#225;p Lu&#7853;t</a>";
        document.getElementById("subMenu").style.marginLeft = "-5px";
        DelayId = id;
    }

   
    else if (id == 3) {
// menu2
    document.getElementById("subMenu").innerHTML = "<a class='aSubMenu' href='http://hot.loveiu.net/search/label/Nh%E1%BB%8Bp%20S%E1%BB%91ng%20Teen#'> Nh&#7883;p S&#7889;ng Teen </a> &nbsp; <img src='" + strLinkImg + "' /> &nbsp; <a class='aSubMenu' href='http://hot.loveiu.net/search/label/Tu%E1%BB%95i%20Tr%E1%BA%BB%20Qu%E1%BA%ADy#'> Tu&#7893;i Tr&#7867; Qu&#7853;y </a>  &nbsp; <img src='" + strLinkImg + "' /> &nbsp; <a class='aSubMenu' href='http://hot.loveiu.net/search/label/Phong%20C%C3%A1ch%20Tr%E1%BA%BB#'> Phong C&#225;ch Tr&#7867; </a>";
        document.getElementById("subMenu").style.marginLeft = "20px";
        DelayId = id;
    }

    else if (id == 4) {
//menu3
        document.getElementById("subMenu").innerHTML = "<a class='aSubMenu' href='http://hot.loveiu.net/search/label/Phim%20T%C3%ACnh%20C%E1%BA%A3m#'>  T&#236;nh c&#7843;m </a> &nbsp; <img src='" + strLinkImg + "' /> &nbsp; <a class='aSubMenu' href='http://hot.loveiu.net/search/label/Phim%20h%C3%A0nh%20%C4%91%E1%BB%99ng#'> H&#224;nh &#273;&#7897;ng  </a> &nbsp; <img src='" + strLinkImg + "' /> &nbsp; <a class='aSubMenu' href='http://hot.loveiu.net/search/label/Phim%20ho%E1%BA%A1t%20h%C3%ACnh#'> Ho&#7841;t h&#236;nh </a>&nbsp; <img src='" + strLinkImg + "' /> &nbsp; <a class='aSubMenu' href='http://hot.loveiu.net/search/label/Phim%20h%C3%A0i'> H&#224;i h&#432;&#7899;c </a>&nbsp; <img src='" + strLinkImg + "' /> &nbsp; <a class='aSubMenu' href='http://hot.loveiu.net/search/label/Phim%20ho%E1%BA%A1t%20h%C3%ACnh#'> Ho&#7841;t h&#236;nh </a>&nbsp; <img src='" + strLinkImg + "' /> &nbsp; <a class='aSubMenu' href='http://hot.loveiu.net/search/label/Phim%20phi%C3%AAu%20l%C6%B0u'> Phi&#234;u l&#432;u </a>&nbsp; <img src='" + strLinkImg + "' /> &nbsp; <a class='aSubMenu' href='http://hot.loveiu.net/search/label/Phim%20th%E1%BB%83%20lo%E1%BA%A1i%20kh%C3%A1c'> Th&#7875; lo&#7841;i kh&#225;c </a>";
        document.getElementById("subMenu").style.marginLeft = "22px";
        DelayId = id;
    }
    else if (id == 5) {
//menu4
        document.getElementById("subMenu").innerHTML = "<a class='aSubMenu' href='http://hot.loveiu.net/search/label/Ki%E1%BA%BFm%20Ti%E1%BB%81n%20Online#'> Ki&#7871;m Ti&#7873;n Online</a>";
        document.getElementById("subMenu").style.marginLeft = "130px";
        DelayId = id;
    }
    else if (id == 6) {
//menu5
        document.getElementById("subMenu").innerHTML = "<a class='aSubMenu' href='http://hot.loveiu.net/search/label/VideoClip%20Kinh%20D%E1%BB%8B#'> Clip Kinh D&#7883; </a> &nbsp; <img src='" + strLinkImg + "' /> &nbsp; <a class='aSubMenu' href='http://hot.loveiu.net/search/label/%E1%BA%A2nh%20Kinh%20D%E1%BB%8B#'> &#7842;nh Kinh D&#7883; </a> &nbsp; <img src='" + strLinkImg + "' /> &nbsp; <a class='aSubMenu' href='http://hot.loveiu.net/search/label/Tin%20Kinh%20D%E1%BB%8B#'> Tin Kinh D&#7883; </a>";
        document.getElementById("subMenu").style.marginLeft = "190px";
        DelayId = id;
    }
    else if (id == 7) {
//menu6
        document.getElementById("subMenu").innerHTML = "<a class='aSubMenu' href='http://hot.loveiu.net/search/label/Tin%20Th%E1%BB%9Di%20S%E1%BB%B1%20-%20X%C3%A3%20H%E1%BB%99i#'> Th&#7901;i S&#7921; - X&#227; H&#7897;i </a> &nbsp; <img src='" + strLinkImg + "' /> &nbsp; <a class='aSubMenu' href='http://hot.loveiu.net/search/label/Tin%20%C3%82m%20Nh%E1%BA%A1c#'> &#194;m Nh&#7841;c </a> &nbsp; <img src='" + strLinkImg + "' /> &nbsp; <a class='aSubMenu' href='http://hot.loveiu.net/search/label/Ng%C3%B4i%20Sao#'> Ng&#244;i Sao </a> &nbsp; <img src='" + strLinkImg + "' /> &nbsp; <a class='aSubMenu' href='http://hot.loveiu.net/search/label/Th%C3%B4ng%20B%C3%A1o#'> Share </a>";
        document.getElementById("subMenu").style.marginLeft = "190px";
        DelayId = id;
    }
        else if (id == 8) {
//menu7
        document.getElementById("subMenu").innerHTML = "<a class='aSubMenu' href='http://hot.loveiu.net/search/label/Tinh%20Y%C3%AAu%20-%20Gi%E1%BB%9Bi%20T%C3%ADnh#'> T&#236;nh iu </a> &nbsp; <img src='" + strLinkImg + "' /> &nbsp; <a class='aSubMenu' href='http://hot.loveiu.net/search/label/Gi%E1%BB%9Bi%20T%C3%ADnh%20T%C3%ACnh%20D%E1%BB%A5c#'> T&#236;nh D&#7909;c </a> &nbsp; <img src='" + strLinkImg + "' /> &nbsp; <a class='aSubMenu' href='http://hot.loveiu.net/search/label/G%C3%B3c%20B%E1%BA%A1n%20G%C3%A1i#'> G&#243;c B&#7841;n G&#225;i </a> &nbsp; <img src='" + strLinkImg + "' /> &nbsp; <a class='aSubMenu' href='http://hot.loveiu.net/search/label/V%C6%B0%E1%BB%9Dn%20%20%C4%90%C3%A0n%20%20%C3%94ng#'> V&#432;&#7901;n &#272;&#224;n &#244;ng</a>";
        document.getElementById("subMenu").style.marginLeft = "190px";
        DelayId = id;
    }
        else if (id == 9) {
//menu8
        document.getElementById("subMenu").innerHTML = "<a class='aSubMenu' href='http://hot.loveiu.net/search/label/Chuy%E1%BB%87n%20L%E1%BA%A1%20-%20K%E1%BB%B3%20Th%C3%BA#'> L&#7841; Qu&#225; &#272;i </a>";
        document.getElementById("subMenu").style.marginLeft = "190px";
        DelayId = id;
    }
        else if (id == 10) {
//menu9
        document.getElementById("subMenu").innerHTML = "<a class='aSubMenu' href='http://hot.loveiu.net/search/label/Bikini%20Girl#'> BikiNi GirL </a> &nbsp; <img src='" + strLinkImg + "' /> &nbsp; <a class='aSubMenu' href='http://hot.loveiu.net/search/label/Girl%20xinh%20t%C3%B4%CC%89ng%20h%C6%A1%CC%A3p#'> Girl Xinh t&#7893;ng h&#7907;p  </a> &nbsp; <img src='" + strLinkImg + "' /> &nbsp; <a class='aSubMenu' href='http://hot.loveiu.net/search/label/Girl%20Vi%E1%BB%87t%20Nam#'> Girl Viet NAm </a> &nbsp; <img src='" + strLinkImg + "' /> &nbsp; <a class='aSubMenu' href='http://hot.loveiu.net/search/label/Ng%C6%B0%E1%BB%9Di%20%C4%91%E1%BA%B9p%20v%C3%A0%20xe#'> Girl + Xe  </a> &nbsp; <img src='" + strLinkImg + "' /> &nbsp; <a class='aSubMenu' href='http://hot.loveiu.net/search/label/HoT%20Boy#'> HoT BoY</a>";
        document.getElementById("subMenu").style.marginLeft = "190px";
        DelayId = id;
    }
            else if (id == 11) {
//menu10
        document.getElementById("subMenu").innerHTML = "<a class='aSubMenu' href='http://hot.loveiu.net/search/label/VideoClip%20-%20Vui#'> Clip Vui </a> &nbsp; <img src='" + strLinkImg + "' /> &nbsp; <a class='aSubMenu' href='http://hot.loveiu.net/search/label/%E1%BA%A2nh%20Vui#'> &#7842;nh Vui </a> &nbsp; <img src='" + strLinkImg + "' /> &nbsp; <a class='aSubMenu' href='http://hot.loveiu.net/search/label/Truy%E1%BB%87n%20tranh%20vui#'> Truy&#7879;n Tranh Vui </a> &nbsp; <img src='" + strLinkImg + "' /> &nbsp; <a class='aSubMenu' href='http://hot.loveiu.net/search/label/Xem%20%2B%20%20C%C6%B0%E1%BB%9Di#'> Xem & Cười</a>";
        document.getElementById("subMenu").style.marginLeft = "190px";
        DelayId = id;
    }
    
    else {
        setFolderDefault();
    }
}


function menuActive() {
try{
    document.getElementById(FolderId).className = 'menuActive' + FolderId + '_' + FolderId;
    writeSubmenu(FolderId);
    }
    catch (err) {
        //document.getElementById(FolderId).className = 'menuActive1_1;
		document.getElementById("1").className = 'menuActive1_1';
        //writeSubmenu(FolderId);
    }
}

function changeStyle(id) {
    if (id == DelayId) {
        clearTimeout(t);
        clearTimeout(t1);
    }
    if (id != FolderId) {
		try
        {
			clearTimeout(t);
			//clearTimeout(t1);
			// if(DelayId!=null)
			//document.getElementById(DelayId).className = 'menuDefault'+DelayId;
			document.getElementById(FolderId).className = 'menuDefault' + FolderId;
			document.getElementById(id).className = 'menuActive' + id + '_' + id;
			writeSubmenu(id);
		}
        catch(err)
		{
			writeSubmenu(1);
        }
    }
    else {
        if (DelayId != null)
        document.getElementById(DelayId).className = 'menuDefault' + DelayId;
        document.getElementById(id).className = 'menuActive' + id + '_' + id;
        writeSubmenu(id);
    }
}
function reChangeStyle(id) {
    if (id != FolderId) {
        t1 = setTimeout('clearMenu(' + id + ')', 10);
        t = setTimeout('menuActive()', 100);
    }
}
function clearMenu(id) {
    try {
        document.getElementById(id).className = 'menuDefault' + id;
    }
    catch (Error) {
    }
}
//end javascript



