/adei/trunk

To get this branch, use:
bzr branch http://darksoft.org/webbzr/adei/trunk
80 by Suren A. Chilingaryan
Few steps on source tree integration in javascript frontend
1
function urlConcatenate(base, extra) {
2
    if (extra) {
3
	if (/\?/.exec(base)) return base + "&" + extra;
4
	else return base + "?" + extra;
5
    }
6
    return base;
7
}
8
9
function urlAddProperty(base, name, value) {
10
    if (/\?/.exec(base)) return base + "&" + name + "=" + value;
11
    else return base + "?" + name + "=" + value;
12
}
13
14
function urlJoinProps(props1, props2, props3, props4, props5) {
15
    var props = false;
16
    
17
    if (props1) {
18
	if (props) props += "&" + props1;
19
	else props = props1;
20
    }
21
22
    if (props2) {
23
	if (props) props += "&" + props2;
24
	else props = props2;
25
    }
26
27
    if (props3) {
28
	if (props) props += "&" + props3;
29
	else props = props3;
30
    }
31
32
    return props;    
33
}