function setCookie(name, value, expires)
{
	// no expiration date specified? use this date and it will just be deleted soon.
        if (!expires) expires = new Date(); 
	document.cookie = name + "=" + escape(value) + "; expires=" + expires.toGMTString() + "; path=/";
}

function setlanguageID()
{
var expdate = new Date (); // pre-set to the current time and date
expdate.setTime(expdate.getTime() + 1000 * 60 * 60 * 24 * 365); // add one year to it 

setCookie("Langage","ID",expdate);

}
function setlanguageEN()
{
var expdate = new Date (); // pre-set to the current time and date
expdate.setTime(expdate.getTime() + 1000 * 60 * 60 * 24 * 365); // add one year to it 

setCookie("Langage","EN",expdate);
}

function get_cookie ( cookie_name )
{
  var results = document.cookie.match ( '(^|;) ?' + cookie_name + '=([^;]*)(;|$)' );

  if ( results )
    return ( unescape ( results[2] ) );
  else
    return null;
}

//Environment variables are usually set at the top of this file.
if ( ! get_cookie ( "Langage" ) )
{
  LANGUAGECHOSEN="EN"
}
else
{
	LANGUAGECHOSEN = get_cookie("Langage");
}
USETEXTLINKS = 1
STARTALLOPEN = 0
// GLOBALTARGET = "S"
BUILDALL = 1
USEFRAMES = 0
USEICONS = 0
WRAPTEXT = 1
PRESERVESTATE = 1
HIGHLIGHT = 0
ICONPATH = "tree_elements/"
//Here we build the treeview structure. See www.treemenu.net for details.
foldersTree = gFld("<b>Sundaya.com</b>", "welcomeEN.php")

aux0 = insFld(foldersTree, gFld("<b>About Us</b>", ""))
aux1 = insFld(aux0, gFld("Company Profile", "CompanyProfile.php"))
aux1 = insFld(aux0, gFld("The Meaning of Light", "TheMeaningofLight.php"))
aux1 = insFld(aux0, gFld("Where we are", "WhereWeAre2.php"))
aux1 = insFld(aux0, gFld("Definitions and Abbreviations", "definitions.php"))

aux0 = insFld(foldersTree, gFld("<b>Animations</b>", "Animationguide.php"))
aux1 = insFld(aux0, gFld("General", ""))
aux2 = insFld(aux1, gFld("Sundaya World", "Sundayaworld.php"))
aux2 = insFld(aux1, gFld("7 reasons for DC", "SevenreasonsDC.php"))
aux2 = insFld(aux1, gFld("Electricity consumption calculation", "D2ElectricityConsumption.php"))
aux2 = insFld(aux1, gFld("Calculation of lowest cost solution", "LowestCostSystem.php"))
aux2 = insFld(aux1, gFld("System Sizing", ""))
aux1 = insFld(aux0, gFld("Systems", ""))
aux2 = insFld(aux1, gFld("What we offer", ""))
aux1 = insFld(aux0, gFld("Generation", ""))
aux2 = insFld(aux1, gFld("Solar Panel", "Solarpanel.php"))
aux2 = insFld(aux1, gFld("DC10", ""))
aux1 = insFld(aux0, gFld("Storage", ""))
aux2 = insFld(aux1, gFld("Function of the Storage System", "D1StorageSystem2.php"))
aux2 = insFld(aux1, gFld("Basic function of the Controller", "ControllerBasicFunction.php"))
aux2 = insFld(aux1, gFld("Advanced function of the Controller", "ControllerAdvancedFunction.php"))
aux2 = insFld(aux1, gFld("Lifetime of a battery", ""))
aux2 = insFld(aux1, gFld("What we offer", ""))
aux1 = insFld(aux0, gFld("Installation Materials", ""))
aux2 = insFld(aux1, gFld("Cables", ""))
aux2 = insFld(aux1, gFld("What we offer", ""))
aux1 = insFld(aux0, gFld("Lighting", ""))
aux2 = insFld(aux1, gFld("Lighting Technologies", ""))
aux2 = insFld(aux1, gFld("What we offer", ""))
aux1 = insFld(aux0, gFld("Appliances", ""))
aux2 = insFld(aux1, gFld("Infotainment", ""))
aux2 = insFld(aux1, gFld("Computing", ""))
aux2 = insFld(aux1, gFld("Telecommunication", ""))
aux2 = insFld(aux1, gFld("Security", ""))
aux2 = insFld(aux1, gFld("What we offer", ""))

aux0 = insFld(foldersTree, gFld("<b>Products</b>", "http://www.sundaya.com/Productsintro.php"))
aux1 = insFld(aux0, gFld("Systems", "http://www.sundaya.com/Systems.php"))
aux2 = insFld(aux1, gFld("Economy", "http://www.sundaya.com/Economy.php"))
aux2 = insFld(aux1, gFld("Standard", "http://www.sundaya.com/Standard.php"))
aux2 = insFld(aux1, gFld("Deluxe", "http://www.sundaya.com/Deluxe.php"))
aux2 = insFld(aux1, gFld("Special", "http://www.sundaya.com/Special.php"))
aux2 = insFld(aux1, gFld("System Codes", "http://www.sundaya.com/SystemCodes.php"))
aux1 = insFld(aux0, gFld("DC Generators", "http://www.sundaya.com/DCGenerators.php"))
aux2 = insFld(aux1, gFld("Solar Panels", "http://www.sundaya.com/daftarprodukEN.php?Kat=SolarPanel"))
aux2 = insFld(aux1, gFld("AC Chargers", "http://www.sundaya.com/daftarprodukEN.php?Kat=AC Charger"))
aux1 = insFld(aux0, gFld("DC Storage Systems", "http://www.sundaya.com/DCStorage.php"))
aux2 = insFld(aux1, gFld("Apple", "http://www.sundaya.com/daftarprodukEN.php?Kat=Apple"))
aux2 = insFld(aux1, gFld("S3", "http://www.sundaya.com/daftarprodukEN.php?Kat=S3&juga=1"))
aux2 = insFld(aux1, gFld("S4", "http://www.sundaya.com/daftarprodukEN.php?Kat=S4"))
aux2 = insFld(aux1, gFld("Batteries", "http://www.sundaya.com/daftarprodukEN.php?Kat=battery"))
aux1 = insFld(aux0, gFld("Installation Materials", "http://www.sundaya.com/InstallationMat.php"))
aux2 = insFld(aux1, gFld("E17 range", "http://www.sundaya.com/E17range.php"))
aux3 = insFld(aux2, gFld("Fittings", "http://www.sundaya.com/daftarprodukEN.php?Kat=Fittings&juga=1"))
aux3 = insFld(aux2, gFld("Lamp Shades", "http://www.sundaya.com/daftarprodukEN.php?Kat=Lampshades"))
aux3 = insFld(aux2, gFld("Accessories", "http://www.sundaya.com/daftarprodukEN.php?Kat=E17Accessories"))
aux2 = insFld(aux1, gFld("DCS Cabling System", "http://www.sundaya.com/DCSCabling.php"))
aux3 = insFld(aux2, gFld("Cable Sets", "http://www.sundaya.com/daftarprodukEN.php?Kat=Cablesets"))
aux3 = insFld(aux2, gFld("Cables", "http://www.sundaya.com/daftarprodukEN.php?Kat=Cable"))
aux3 = insFld(aux2, gFld("Connectors", "http://www.sundaya.com/daftarprodukEN.php?Kat=Connectors"))
aux3 = insFld(aux2, gFld("Switches & Sockets", "http://www.sundaya.com/daftarprodukEN.php?Kat=Switches&juga=1"))
aux3 = insFld(aux2, gFld("Accessories", "http://www.sundaya.com/daftarprodukEN.php?Kat=InstallAccessories"))
aux2 = insFld(aux1, gFld("PV Module Support Structures", "http://www.sundaya.com/Roofmounts.php"))
aux3 = insFld(aux2, gFld("PV Module Support components", "http://www.sundaya.com/daftarprodukEN.php?Kat=Module Support"))
aux2 = insFld(aux1, gFld("Miscellaneous", "http://www.sundaya.com/daftarprodukEN.php?Kat=Miscellaneous"))
aux1 = insFld(aux0, gFld("DC Lighting", "http://www.sundaya.com/DCLighting.php"))
aux2 = insFld(aux1, gFld("Ulitium", "http://www.sundaya.com/Ulitium.php"))
aux2 = insFld(aux1, gFld("Alight", "http://www.sundaya.com/daftarprodukEN.php?Kat=Alight&juga=1"))
aux2 = insFld(aux1, gFld("Ulite", "http://www.sundaya.com/daftarprodukEN.php?Kat=Ulite"))
aux2 = insFld(aux1, gFld("Qlite", "http://www.sundaya.com/daftarprodukEN.php?Kat=Ulux"))
aux2 = insFld(aux1, gFld("Multilight", "http://www.sundaya.com/daftarprodukEN.php?Kat=Multilight"))
aux2 = insFld(aux1, gFld("Lumi", "http://www.sundaya.com/daftarprodukEN.php?Kat=Lumi"))
aux2 = insFld(aux1, gFld("Luna", "http://www.sundaya.com/daftarprodukEN.php?Kat=Luna"))
aux2 = insFld(aux1, gFld("Lightkits", ""))
aux3 = insFld(aux2, gFld("Economy", ""))
aux3 = insFld(aux2, gFld("Standard", "http://www.sundaya.com/daftarprodukEN.php?Kat=Standard Lightkit"))
aux3 = insFld(aux2, gFld("Deluxe", "http://www.sundaya.com/daftarprodukEN.php?Kat=Deluxe Lightkit"))
aux3 = insFld(aux2, gFld("Superior", ""))
aux1 = insFld(aux0, gFld("DC Appliances", "http://www.sundaya.com/DCAppliances.php"))
aux2 = insFld(aux1, gFld("Television", "http://www.sundaya.com/daftarprodukEN.php?Kat=Television"))
aux2 = insFld(aux1, gFld("Audio/Video", "http://www.sundaya.com/daftarprodukEN.php?Kat=Audio/Video"))
aux2 = insFld(aux1, gFld("Communication", ""))
aux2 = insFld(aux1, gFld("Computers", "http://www.sundaya.com/daftarprodukEN.php?Kat=Computer"))
aux2 = insFld(aux1, gFld("Electronics", "http://www.sundaya.com/daftarprodukEN.php?Kat=Electronics"))
aux1 = insFld(aux0, gFld("Services", "http://www.sundaya.com/Services.php"))
aux2 = insFld(aux1, gFld("Engineering", "http://www.sundaya.com/daftarprodukEN.php?Kat=Engineering&juga=1"))
aux1 = insFld(aux0, gFld("Pricelist", ""))
aux2 = insFld(aux1, gFld("International", ""))
aux3 = insFld(aux2, gFld("Retail", "http://www.sundaya.com/GenPricelist.php"))
aux3 = insFld(aux2, gFld("Dealer", "http://www.sundaya.com/verifyDlr.php"))
aux3 = insFld(aux2, gFld("Distributor", "http://www.sundaya.com/verifyDist.php"))
aux3 = insFld(aux2, gFld("Agent", "http://www.sundaya.com/verifyAgt.php"))
aux3 = insFld(aux2, gFld("Payment policy", "http://www.sundaya.com/PaymentPolicy.php"))
aux2 = insFld(aux1, gFld("Sri Lanka", ""))
aux3 = insFld(aux2, gFld("Retail", "http://www.sundaya.com/SLKGenPricelist.php"))
aux3 = insFld(aux2, gFld("Dealer", "http://www.sundaya.com/SLKverifyDlr.php"))
aux3 = insFld(aux2, gFld("Distributor", "http://www.sundaya.com/SLKverifyDist.php"))
aux3 = insFld(aux2, gFld("Payment policy", "http://www.sundaya.com/SLKPaymentPolicy.php"))
aux2 = insFld(aux1, gFld("Philippines", ""))
aux3 = insFld(aux2, gFld("Retail", "http://www.sundaya.com/WWPGenPricelist.php"))
aux3 = insFld(aux2, gFld("Dealer", "http://www.sundaya.com/WWPverifyDlr.php"))
aux3 = insFld(aux2, gFld("Distributor", "http://www.sundaya.com/WWPverifyDist.php"))
aux3 = insFld(aux2, gFld("Payment policy", ""))
aux2 = insFld(aux1, gFld("Indonesia", ""))
aux3 = insFld(aux2, gFld("Retail", "http://www.sundaya.com/SIAGenPricelist.php"))
aux3 = insFld(aux2, gFld("Dealer", "http://www.sundaya.com/SIAverifyDlr.php"))
aux3 = insFld(aux2, gFld("Distributor", "http://www.sundaya.com/SIAverifyDist.php"))
aux3 = insFld(aux2, gFld("Payment policy", "http://www.sundaya.com/PaymentPolicy.php"))

aux0 = insFld(foldersTree, gFld("<b>Contact Us</b>", ""))
aux1 = insFld(aux0, gFld("General Inquiry", "http://www.sundaya.com/GeneralInquiry.php"))

aux0 = insFld(foldersTree, gFld("<b>Photo Gallery</b>", ""))
aux1 = insFld(aux0, gFld("The Beauty of Detail", "http://www.sundaya.com/phpslideshow.php?directory=slides/The_beauty_of_detail"))
aux1 = insFld(aux0, gFld("Beautiful Rural Kenya", "http://www.sundaya.com/phpslideshow.php?directory=slides/The_beauty_of_rural_Kenya"))

aux0 = insFld(foldersTree, gFld("<b>Job Openings</b>", ""))
aux1 = insFld(aux0, gFld("Indonesia", ""))

aux0 = insFld(foldersTree, gFld("<b>Language</b>", ""))
aux1 = insFld(aux0, gFld("English", ""))

aux0 = insFld(foldersTree, gFld("<b>Register</b>", ""))
aux1 = insFld(aux0, gFld("New User Sign-Up", "http://www.sundaya.com/registerEN.php"))
aux1 = insFld(aux0, gFld("Change Password", "http://www.sundaya.com/changePassword.php"))

foldersTree.treeID = "t2";