﻿function _getObject(_objname) {
if(document.getElementById)
    return document.getElementById(_objname);
else if(document.all)
    return document.all[_objname];
else if(document.layers)
    return document.layers[_objname];
else
    return null;
}
function doHttpGet(key,value,ignoreExistingParameters){
    var params = window.location.search;
    if (ignoreExistingParameters) {
        var url;
        if (params.toLowerCase().indexOf("url=") > -1)
            url = params.toLowerCase().match(/url=[^&]*/);
        if (url != null)
            params = "?" + url[0] + "&" + key + "=" + value;
        else
            params = "?" + key + "=" + value;
        window.location.href = window.location.protocol + "//" + window.location.hostname + window.location.pathname + params;
    } else {
        var params = window.location.search;
        if (params == "")
            window.location.href = window.location.href + "?" + key + "=" + value;
        else if (params.indexOf("?" + key + "=") > -1 || params.indexOf("&" + key + "=") > -1) {
            var ausdr = new RegExp("([?|&])" + key + "=[^&]*");
            window.location.href = params.replace(ausdr, "$1" + key + "=" + value);
        }
        else
            window.location.href = window.location.href + "&" + key + "=" + value;
    }
}

$(function() { // smoth scroll to top
	$('a[href=#top]').click(function() {
		$('html, body').animate({scrollTop: 0}, 'slow');
		return false;
	});
});
