function getArgs() {
var args = new Object();
// Get Query String
var query = location.search.substring(1);
// Split query at the comma
var pairs = query.split("&");
// Begin loop through the querystring
for(var i = 0; i < pairs.length; i++) {
// Look for "name=value"
var pos = pairs[i].indexOf('=');
// if not found, skip to next
if (pos == -1) continue;
// Extract the name
var argname = pairs[i].substring(0,pos);
// Extract the value
var value = pairs[i].substring(pos+1);
// Store as a property
args[argname] = unescape(value);
}
return args; // Return the Object
}
function translate() {
var args = getArgs();
if (args.page) wl_ourl = (args.page);
top.location.href = wl_url + 'http://sigplan.cali.gov.co/default.asp?pagina=' + wl_ourl;
}
var totalPPL = 8;
var menuTimeout = 100;
function rndImg(img, path) {
if (path == null) {path = ""};
if (goCookies) {
var x = myCookie.counter;
} else {
var x = parseInt(1 + (Math.random() % 10) * totalPPL);
}
var imgString = "" + path + img + x + ".jpg";
return imgString;
};
function fosRnd(fos) {
x = document.getElementById(fos).style;
x.backgroundImage = 'url("' + rndImg('fos_bg_','/images/') + '")';
x.backgroundRepeat = 'no-repeat';
x.backgroundPosition = 'bottom right';
};
function posElementX(element, reference) {
document.getElementById(element).style.left = getAnchorX(reference) - 110;
};
function move_in(img_name,img_src) {
document[img_name].src="" + img_src;
};
function move_out(img_name,img_src) {
document[img_name].src="" + img_src;
};
var dropTransURL;
dropTransURL = document.location.href;
var tempTable = new Object();
var TimerID = 100;
function constructTable(arrayName) {
var startPos = 0;
var tableProperties = startPos + 1;
var tableElements = tableProperties + 1;
var tableCode = tableCodeFront = tableCodeMiddle = tableCodeBack = tempText = tempURL = '';
tempTable = {
tableWidth: eval(arrayName)[tableProperties][0],
tablePadding: eval(arrayName)[tableProperties][1],
tableBorderColor: eval(arrayName)[tableProperties][2],
tableBorderSize: eval(arrayName)[tableProperties][3],
tableBGColor: eval(arrayName)[tableProperties][4],
textClass: eval(arrayName)[tableProperties][5]
};
var tableCodeFront = '
';
for (i = tableElements; i < eval(arrayName).length; i++) {
tempText = eval(arrayName)[i][0];
tempURL = eval(arrayName)[i][1];
if (eval(arrayName)[i][2] == '>') {
tableCodeMiddle += ' |
';
} else {
tableCodeMiddle += ' |
';
};
};
tableCode = tableCodeFront + tableCodeMiddle + tableCodeBack;
return tableCode;
};
function showtip(state, name, offsetx, offsety,hijo) {
if (TimerID) clearTimeout(TimerID);
if (state) {
if (document.layers) {
theString = "" + constructTable(name) + "";
document.tooltip.document.write(theString);
document.tooltip.document.close();
document.tooltip.left = offsetx;
document.tooltip.top = offsety;
document.tooltip.visibility = "show";
} else {
if (document.getElementById) {
elm = document.getElementById("tooltip");
elm.innerHTML = constructTable(name);
elm.style.left = offsetx;
elm.style.top = offsety;
elm.style.visibility = "visible";
}
}
} else {
if (document.layers) {
document.tooltip.visibility = "hidden";
} else if (document.getElementById) {
elm.style.visibility = "hidden";
};
};
};
function showMenu() {
//alert('ok');
var totalArguments = arguments.length;
var onOff = arguments[0];
var arg1 = arguments[1]
var arg2 = arguments[2];
var arg3 = arguments[3];
var arg4 = arguments[4];
if (onOff) {
clearTimeout(TimerID);
showtip(1, arg1, arg2, arg3,arg4);
} else {
clearTimeout(TimerID);
TimerID = setTimeout('showtip(0)', menuTimeout);
};
};
function getAnchorPosition(anchorname) {
var useWindow=false;
var coordinates=new Object();
var x=0,y=0;
var use_gebi=false, use_css=false, use_layers=false;
if (document.getElementById) { use_gebi=true; }
else if (document.all) { use_css=true; }
else if (document.layers) { use_layers=true; };
if (use_gebi && document.all) {
x=AnchorPosition_getPageOffsetLeft(document.all[anchorname]);
y=AnchorPosition_getPageOffsetTop(document.all[anchorname]);
} else if (use_gebi) {
var o=document.getElementById(anchorname);
x=AnchorPosition_getPageOffsetLeft(o);
y=AnchorPosition_getPageOffsetTop(o);
} else if (use_css) {
x=AnchorPosition_getPageOffsetLeft(document.all[anchorname]);
y=AnchorPosition_getPageOffsetTop(document.all[anchorname]);
} else if (use_layers) {
var found=0;
for (var i=0; i totalPPL) {myCookie.counter = 1};
myCookie.write();
if (!myCookie.read() || !myCookie.counter) {
goCookies = 0;
} else {
goCookies = 1;
};
function clearCookie() {myCookie.del()};
function showTooltip() {
var totalArguments = arguments.length;
var onOff = arguments[0];
var arg1 = arguments[1];
var arg2 = arguments[2];
var arg3 = arguments[3];
var arg4 = arguments[4];
if (onOff) {
clearTimeout(TimerID);
tooltipShowHide(1, arg1, arg2, arg3, arg4);
} else {
clearTimeout(TimerID);
TimerID = setTimeout('tooltipShowHide(0)', menuTimeout);
};
};
function tooltipShowHide(state, title, code, offsetx, offsety) {
if (TimerID) clearTimeout(TimerID);
if (state) {
if (document.layers) {
theString = "" + constructTip(title, code) + "";
document.tooltip.document.write(theString);
document.tooltip.document.close();
document.tooltip.left = offsetx;
document.tooltip.top = offsety;
document.tooltip.visibility = "show";
} else {
if (document.getElementById) {
elm = document.getElementById("smallTooltip");
elm.innerHTML = constructTip(title, code);
elm.style.left = offsetx;
elm.style.top = offsety;
elm.style.visibility = "visible";
}
}
} else {
if (document.layers) {
document.tooltip.visibility = "hidden";
} else if (document.getElementById) {
elm.style.visibility = "hidden";
};
};
};
function constructTip(title, code) {
var tipFront = '| ' + title + ' | | ';
var tipBack = ' |
|
';
return tipFront + code + tipBack;
}