|
3) {
if (navigator.appName==”Netscape”) {
winW = window.innerWidth;
winH = window.innerHeight; }
if (navigator.appName.indexOf(“Microsoft”)!=-1) {
winW = document.body.offsetWidth;
winH = document.body.offsetHeight; }
}
if (screenwid > width) width = screenwid;
if (screenhgt > height) height = screenhgt;
if (winW > width) width = winW;
if (winH > height) height = winH;
var left = Math.ceil((pageWidth – width)/2);
var top = Math.ceil((pageHeight – height)/3);
var left = 0;
var top = 0;
new Fx.Style(id, ‘left’).set(left);
new Fx.Style(id, ‘top’).set(top);
new Fx.Style(‘contextHelp’, ‘width’).set(width);
new Fx.Style(‘contextHelp’, ‘height’).set(height);
new Fx.Style(‘contextHelp’, ‘left’).set(left);
new Fx.Style(‘contextHelp’, ‘top’).set(top);
new Fx.Style(‘contextHelp’, ‘opacity’).set(0);
new Fx.Style(id, ‘opacity’).set(1.0);
}
function openHelp(id)
{
var width = window.getWidth();
var height = window.getHeight();
var screenwid = window.getScrollWidth();
var screenhgt = window.getScrollHeight();
var winW = 0; var winH = 0;
if (parseInt(navigator.appVersion)>3) {
if (navigator.appName==”Netscape”) {
winW = window.innerWidth;
winH = window.innerHeight; }
if (navigator.appName.indexOf(“Microsoft”)!=-1) {
winW = document.body.offsetWidth;
winH = document.body.offsetHeight; }
}
if (screenwid > width) width = screenwid;
if (screenhgt > height) height = screenhgt;
if (winW > width) width = winW;
if (winH > height) height = winH;
$(‘divGrayOut’).setStyles({
top: 0,
left: 0,
display: ‘block’
});
$(‘contextHelp’).setStyles({
display: ‘block’
});
var effects = $(‘divGrayOut’).effects({duration: 200, transition: Fx.Transitions.linear, onComplete: function (control) { centerPanel(id, width, height); }});
effects.start({
‘height’: [0, height],
‘width’: [0, width],
‘top’ : [height/2, 0],
‘left’: [width/2, 0],
‘opacity’: [0, .8]
});
}
function closeHelp(id)
{
var width = window.getWidth();
var height = window.getHeight();
var screenwid = window.getScrollWidth();
var screenhgt = window.getScrollHeight();
var winW = 0; var winH = 0;
if (parseInt(navigator.appVersion)>3) {
if (navigator.appName==”Netscape”) {
winW = window.innerWidth;
winH = window.innerHeight; }
if (navigator.appName.indexOf(“Microsoft”)!=-1) {
winW = document.body.offsetWidth;
winH = document.body.offsetHeight; }
}
if (screenwid > width) width = screenwid;
if (screenhgt > height) height = screenhgt;
if (winW > width) width = winW;
if (winH > height) height = winH;
var effects = $(‘divGrayOut’).effects({duration: 200, transition: Fx.Transitions.linear, onStart: function () { new Fx.Style(id, ‘opacity’).set(0); } });
effects.start({
‘top’: [0, height/2],
‘left’: [0, width/2],
‘width’: [width, 0],
‘height’: [height, 0],
‘opacity’: [.8, 0]
});
new Fx.Style(‘contextHelp’, ‘opacity’).set(0);
new Fx.Style(‘contextHelp’, ‘width’).set(0);
new Fx.Style(‘contextHelp’, ‘height’).set(0);
new Fx.Style(‘contextHelp’, ‘left’).set(0);
new Fx.Style(‘contextHelp’, ‘top’).set(0);
$(‘divGrayOut’).setStyles({
display: ‘none’
});
$(‘contextHelp’).setStyles({
display: ‘none’
});
$(‘ctl00_ContentPlaceHolder1_hlpWebsitePreviewHelp_dpContextHelp’).setStyles({
display: ‘none’
});
}
function MovePWSDiv(DivID, iState, xloc, yloc) // 1 visible, 0 hidden
{
if(document.layers) //NN4+
{
document.layers[DivID].visibility = iState ? “show” : “hide”;
}
else if(document.getElementById) //gecko(NN6) + IE 5+
{
var obj = document.getElementById(DivID);
if (xloc == -1) {
xloc = obj.offsetLeft; }
if (yloc == -1) {
yloc = obj.offsetTop; }
obj.style.visibility = iState ? “visible” : “hidden”;
obj.style.left=xloc+”px”;
obj.style.top=yloc+”px”;
}
else if(document.all) // IE 4
{
document.all[DivID].style.visibility = iState ? “visible” : “hidden”;
}
}
var checktimes = 1
function get_cookie(Name) {
var search = Name + “=”
var returnvalue = “”
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) {
offset += search.length
end = document.cookie.indexOf(“;”, offset)
if (end == -1)
end = document.cookie.length
returnvalue=unescape(document.cookie.substring(offset, end))
}
}
return returnvalue;
}
function checkifok(){
if (get_cookie(‘alerted’)==”){
sendnotice()
document.cookie=”alerted=yes”
}
}
if (checktimes==2)
sendnotice()
else if (checktimes==0)
document.cookie=”alerted=yes”
else if (checktimes!=0)
checkifok()
function sendnotice() {
openHelp(‘ctl00_ContentPlaceHolder1_hlpWebsitePreviewHelp’);
CenterDialogBox(“ctl00_ContentPlaceHolder1_hlpWebsitePreviewHelp_dpContextHelp”,window.getWidth(),(window.getHeight()-(window.getHeight()/2))+100);
if (document.all) {
MovePWSDiv(‘ctl00_ContentPlaceHolder1_hlpWebsitePreviewHelp_dpContextHelp’,1,document.body.offsetWidth*.25,document.body.offsetHeight*.1);
}
}
// –>