blob: 0893f2053edceffbb6e5a1b0027d785936a1c565 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
function showSignin() {
if (document.getElementById('oid_hidden') !== undefined) {
document.getElementById('oid_hidden').id = 'oid_wrapper';
}
}
function hideSignin() {
if (document.getElementById('oid_wrapper') !== undefined) {
document.getElementById('oid_wrapper').id = 'oid_hidden';
}
}
function savePref(pref, value) {
setCookie('pref_'+pref, value, 9999);
}
//Cookie functions from w3schools.com
function setCookie(c_name,value,exdays)
{
var exdate=new Date();
exdate.setDate(exdate.getDate() + exdays);
var c_value=escape(value) + ((exdays==null) ? "" : "; expires="+exdate.toUTCString());
document.cookie=c_name + "=" + c_value;
}
function getCookie(c_name)
{
var i,x,y,ARRcookies=document.cookie.split(";");
for (i=0;i<ARRcookies.length;i++)
{
x=ARRcookies[i].substr(0,ARRcookies[i].indexOf("="));
y=ARRcookies[i].substr(ARRcookies[i].indexOf("=")+1);
x=x.replace(/^\s+|\s+$/g,"");
if (x==c_name)
{
return unescape(y);
}
}
return "";
}
//Make unselectable elements unselectable (hack for IE 9.0 and below, which doesn't support our CSS)
$(document).ready(function()
{
if ($.browser.msie && $.browser.version < 10)
{
$('.unselectable').find(':not(input)').attr('unselectable', 'on');
}
});
|