// @type Javascript Document
// @mission Global Javascript
// @copyright Hostcrown
// @project Hostcrown.com website
// @version 2.0
// @website www.hostcrown.com
// @since File available since Release 2.0
window.addEvent('domready', function(){
// New scroll
new SmoothScroll();
// Detect cookie
if (!navigator.cookieEnabled){
new Element('div', { // New overlay
'styles': {
'background-color': '#000',
'opacity': 0.9,
'width': window.getWidth(),
'height': window.getScrollHeight(),
'position': 'absolute',
'top': 0,
'left': 0
},
'id': 'overlay'
}).injectBefore('container');
var cookie_box = new Element('div', { // Box message is showed when users don't set to accept cookie
'styles': {
'background': '#FFF',
'border': 'solid 4px #CCC',
'opacity': 0,
'padding': '20px',
'width': '400px',
'position': 'fixed',
'left': window.getWidth()/2,
'top': window.getHeight()/2,
'margin-left': '-225px',
'margin-top': '-120px'
},
'id': 'no_cookie_box'
}).injectAfter('overlay');
// For IE6
if(window.ie6 == true){
cookie_box.setStyles({
'position': 'absolute'
});
}
cookie_box.setHTML('![]()
Hostcrown requires that visitors enable within their web browser a technology known as "cookies".
Please enable cookies and refresh your browser to access our website.'); $('no_cookie_box').effect('opacity', {duration: 10000, transitions: Fx.Transitions.linear}).start(0, 100); } }); function showHideIt(type, id) // option: same / new { //if(!$defined('myslide')) myslide = new Fx.Slide(id); if(typeof(myslide) == 'undefined') myslide = new Fx.Slide(id); if(type == "hide"){ myslide.slideOut(); } else if(type == "show"){ myslide.slideIn(); } else if(type == "quickHide"){ myslide.hide(); } else if(type == "toggle") { myslide.toggle(); } else if(type == "quickToggle"){ if($(id).getStyle('display') == "none") { $(id).setStyle('display', 'block'); } else { $(id).setStyle('display', 'none'); } } } function openWindow(url, width, height) { var myWindow; var left = parseInt((screen.availWidth/2) - (width/2)); var top = parseInt((screen.availHeight/2) - (height/2)); var windowFeatures = "width=" + width + ",height=" + height + ",toolbar=no,resizable=yes, scrollbars=yes,status=yes,left=" + left + ",top=" + top + "screenX=" + left + ",screenY=" + top; myWindow = window.open(url, "whois", windowFeatures); // Detect Popup Blocker var mine = window.open('','','width=1,height=1,left=0,top=0,scrollbars=no,toolbar=no,status=yes,resizeable=yes'); if(mine) { var popUpsBlocked = false; } else { var popUpsBlocked = true; } mine.close(); if(popUpsBlocked) { alert('We have detected that you are using popup blocking software.\nPlease turn it off and try again'); } } function ajax_domain() { $('domain_result').innerHTML = '