/****************************** Starts list of NS functions ****************************/
/* set dummy layers with respect to main/sun */
/* dynmic navigation from the main navigation*/
function setNSSubLayers(c_cat,index, start_top, start_left, img0, img1)
{
setClearSubLayer(main_sub_cat_length);
document.layers["tlayer"].visibility = "hide";
var temp_sub_arr = getSubNavisOnly(c_cat); // array of sub navis
if(main_sub_cat_length > 0)
{ //starts if-1 atlease on subnavis
if(temp_sub_arr.length > 0)
{ //starts if-3
f_str_dyn_sub_list = temp_sub_arr;
ns_layers_height = 0;
ns_sub_start_top = start_top;
var position = index; //index
for(var i=0;i<temp_sub_arr.length;i++)
{ //starts for loop
//var lay="sub_layer_"+i;
var layer_id = temp_sub_arr[i]; //array -temp
var act_layer = 'act_' + layer_id; // active layer
document.layers[layer_id].visibility = "show";
document.layers[layer_id].top = ns_sub_start_top;
document.layers[act_layer].top = ns_sub_start_top;
document.layers[layer_id].left = start_left;
document.layers[act_layer].left = start_left;
img_over = img1;
img_out = img0;
document.layers[layer_id].background.src = img0;
document.layers[act_layer].background.src = img1;
// document.layers[layer_id].bgcolor="#12acacac";
document.layers[layer_id].resizeTo(eval(common_width),eval(common_height));
document.layers[act_layer].resizeTo(eval(common_width ),eval(common_height));
ns_sub_start_top += ns_sub_inc_top+2;
ns_layers_height += ns_sub_def_height + 2;
position++;
} //close for loop
document.layers["tlayer"].visibility = "show";
document.layers["tlayer"].resizeTo(eval(ns_sub_def_width + 40),eval(ns_layers_height + 40));
document.layers["tlayer"].top = start_top - 5;
// document.layers["tlayer"].left = start_left;
if(location_identifier == 'r')
document.layers["tlayer"].left = start_left-(eval(ns_sub_def_width/4));
else if(location_identifier == 'l')
document.layers["tlayer"].left = start_left; //document.layers["tlayer"].left = start_left - 40;
else if(vertical_location == 'l')
document.layers["tlayer"].left = start_left; //document.layers["tlayer"].left = start_left - 40;
else if(vertical_location == 'r')
document.layers["tlayer"].left = start_left-(eval(ns_sub_def_width/4));
// document.layers["tlayer"].bgColor="#fafa00";
document.layers["bglayer"].visibility = "show";
document.layers["bglayer"].resizeTo(eval(ns_sub_def_width+4),eval(ns_layers_ height+1));
document.layers["bglayer"].top = start_top-1;
document.layers["bglayer"].left = start_left-1;
document.layers["bglayer"].bgColor='#b2b2b2';
} //close if -3
} // over the if -1
} // over the function
function onSubNaviNSMouseOver(ilayer,slayer)
{
current_page_id = ''; //current page id
current_url_status = ''; //current url
ilayer.visibility ='hide';
document.layers[slayer].visibility = 'show';
document.layers[slayer].top = ilayer.top;
document.layers[slayer].left = ilayer.left;
document.layers[slayer].resizeTo(eval(common_width),eval(common_height));
}
/* Click to new link for NS */
function getAction()
{
if(current_url_status == 'y' && current_page_id != '') //cursor points to page id
{
window.location.href = current_page_id + '.html';
}
else if(current_url_status == '' && current_page_id == '' )//cursor has no page id
getTop();
} // close the function
/* clear all sub navigation */
function setClearNSSubLayer(slength)
{
if(slength > 0)
{ //starts if - more than one navis
for(var i=0;i<main_sub_cat_length;i++)
{ //starts for loop - run navis
// var lay="sub_layer_"+i;
var lay = main_sub_cat_arr[i].split(":"); // array layers
var layi = lay[1]; //at position 2
var layiact = 'act_' + lay[1]; //active layer
document.layers[layi].visibility = "hide";
document.layers[layiact].visibility = "hide";
} //close the loop
document.layers["bglayer"].visibility = "hide";
} //close if
} // close the function
Bookmarks