if ($(window).width()<=1024)
	{
		document.write('<link href="../css/mobile.css" rel="stylesheet" type="text/css" />')
		document.write('<meta id="ctl00_viewport" name="viewport" content="width=320; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />')

	} else {
		document.write('<link href="../css/template.css" rel="stylesheet" type="text/css" />')
};

var arr_onload = Array();
window.onload = function() {
	for (var i=0;i<arr_onload.length;i++) {
		arr_onload[i]();
	}
}
function SS_JoinEmail(str_link_id, str_domain,str_user) {
	var str_email_addr = str_user + String.fromCharCode(Math.pow(2,6)) + str_domain;
	var obj_link = document.getElementById(str_link_id);
	obj_link.href = 'mail' + 'to:' + str_email_addr;
	obj_link.innerHTML = str_email_addr;
}
function SS_Popup(str_url) {
	MM_openBrWindow(str_url,'','scrollbars=yes,width=420,height=420');
	return false;
}
function SS_HttpReq(str_http_url, obj_function) {
	if (typeof(SS_AjaxStart) == 'function') SS_AjaxStart();
	var xmlHttpReq = false;
	var self = this;
	if (window.XMLHttpRequest) {
		self.xmlHttpReq = new XMLHttpRequest();
	} else if (window.ActiveXObject) {
		self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
	}
	self.xmlHttpReq.open('GET', str_http_url, true);
	self.xmlHttpReq.onreadystatechange = function() {
		if (self.xmlHttpReq.readyState == 4) {
			if (typeof(SS_AjaxComplete) == 'function') SS_AjaxComplete();
			if (self.xmlHttpReq.status==200) {
				if (typeof(obj_function) == 'function') obj_function(self.xmlHttpReq.responseText);
			} else {
				alert('HTTP Error ' + self.xmlHttpReq.status + ' occured while getting content.');
			}
		}
	}
	self.xmlHttpReq.send(null);
}
function SS_UrlEncode(str_input) {
	return escape(str_input).replace(/\+/g,'%2B');
}
function SS_HTMLEncode(str_input) {
   var obj_div = document.createElement('div');
   var obj_text = document.createTextNode(str_input);
   obj_div.appendChild(obj_text);
   return obj_div.innerHTML;
}
function MM_goToURL() {
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
function MM_openBrWindow(theURL,winName,features) {
  window.open(theURL,winName,features);
}

