// JavaScript Document
<!--

function setSelection(id, newValue)
{
	eval("document.subscription."+id+".value = newValue");
	//alert(eval("document.subscription."+id+".value = newValue"));
}

function getTheTime(folder){
	//alert('Running Time');
	//setInterval('getTimeAjax("'+folder+'")',1000);
	setInterval('javascriptTime()',1000);
}

function javascriptTime(){
	var theTime;
	var currentTime = new Date()
	var hours = currentTime.getHours()
	var minutes = currentTime.getMinutes()
	var seconds = currentTime.getSeconds()
	var month = currentTime.getMonth() + 1
	var day = currentTime.getDate()
	var year = currentTime.getFullYear()

	if (minutes < 10){
	minutes = "0" + minutes
	}
	if (seconds < 10){
	seconds = "0" + seconds
	}
	if (hours < 10){
	hours = "0" + hours
	}
	theTime = hours + ":" + minutes + ":"+seconds+" - "+ day + "/" + month + "/" + year;


	document.getElementById('theTime').innerHTML = theTime;
}


function php_serialize(obj)
{
    var string = '';

    if (typeof(obj) == 'object') {
        if (obj instanceof Array) {
            string = 'a:';
            tmpstring = '';
            count = 0;
            for (var key in obj) {
                tmpstring += php_serialize(key);
                tmpstring += php_serialize(obj[key]);
                count++;
            }
            string += count + ':{';
            string += tmpstring;
            string += '}';
        } else if (obj instanceof Object) {
            classname = obj.toString();

            if (classname == '[object Object]') {
                classname = 'StdClass';
            }

            string = 'O:' + classname.length + ':"' + classname + '":';
            tmpstring = '';
            count = 0;
            for (var key in obj) {
                tmpstring += php_serialize(key);
                if (obj[key]) {
                    tmpstring += php_serialize(obj[key]);
                } else {
                    tmpstring += php_serialize('');
                }
                count++;
            }
            string += count + ':{' + tmpstring + '}';
        }
    } else {
        switch (typeof(obj)) {
            case 'number':
                if (obj - Math.floor(obj) != 0) {
                    string += 'd:' + obj + ';';
                } else {
                    string += 'i:' + obj + ';';
                }
                break;
            case 'string':
                string += 's:' + obj.length + ':"' + obj + '";';
                break;
            case 'boolean':
                if (obj) {
                    string += 'b:1;';
                } else {
                    string += 'b:0;';
                }
                break;
        }
    }

    return string;
}
/*----------- Form Scripts -------------------------*/
function fieldUpdate(srcField, desField, formID){
	var theformID = eval('document.'+formID);
	var srcFieldData = theformID[srcField].value;
	//alert(srcFieldData);
	//alert(theformID[desField].value);
	theformID[desField].value = srcFieldData;
	
}

function gup( name )
{
  name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
  var regexS = "[\\?&]"+name+"=([^&#]*)";
  var regex = new RegExp( regexS );
  var results = regex.exec( window.location.href );
  if( results == null )
    return "";
  else
    return results[1];
}

-->
