Wednesday, March 25, 2009

function sendRequest(iframe_id, service_name, args_list, remote_relay_url,callback, local_relay_url) {_IFPC.call(iframe_id, service_name, args_list, remote_relay_url, callback,local_relay_url);}function _IFPC_SetPref(key, value) {throw new Error("To use this feature, you must add " +" to your tag.");}
function _IG_SetTitle(title) {throw new Error("To use this feature, you must add " +" to your tag.");}function _IG_AdjustIFrameHeight() {throw new Error("To use this feature, you must add " +" to your " +" tag.");}
var gv = null;if (window.gadgets && window.gadgets.views) {var errFunc = function() {throw new Error("To use this feature, you must add " +" to your " +" tag.");};gv = window.gadgets.views;gv.requestNavigateTo = gv.getCurrentView = gv.getParams = errFunc;}
_IG_Prefs._addAll("0", [["msg_footer_feedback","Feedback - Ads by Google"],["msg_navigation_verb","of"],["msg_adsby","Ads by Google"],["up_json_ad_data",""],["up_abgurl",""],["up_aiturl","DEBUG"],["up_clickurl","DEBUG"],["up_.lang","en"],["up_.country","us"],["up_synd","ads"]]);if (window._isk) {window._isk[0] = "-4200819927877383896";}

html,body,div,span,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td{
margin:0;
padding:0;
border:0;
font-weight:inherit;
font-style:inherit;
font-size:100%;
font-family:inherit;
}
body{
line-height:1;
color:#000000;
background:#ffffff;
}
ol,ul{
list-style:none;
}
#container{
font-family:Arial,sans-serif;
border:1px solid #000000;
}
#headline{
text-align:center;
color:#000000;
text-decoration:none;
padding:0 5px;
}
#chrome{
}
#content{
cursor:pointer;
}
#imageBox{
text-align:center;
overflow:hidden;
}
#image{
}
#paragraph,#linkBack{
font-size:10pt;
}
#playPause{
position:absolute;
top:2px;
left:27px;
width:36px;
height:15px;
cursor:pointer;
}
#slidePrev{
position:absolute;
top:2px;
left:12px;
width:7px;
height:15px;
cursor:pointer;
}
#slideNext{
position:absolute;
top:2px;
left:71px;
width:7px;
height:15px;
cursor:pointer;
}
#controls{
position:absolute;
right:0;
bottom:0;
width:86px;
height:38px;
background:url(http://pagead2.googlesyndication.com/pagead/gadgets/slideshow/controls_back.png) no-repeat top left;
z-index:5;
}
#abgImage{
position:absolute;
top:20px;
left:4px;
}
#linkBack{
position:absolute;
bottom:5px;
left:5px;
z-index:6;
color:blue;
}
.container11,.container12,.container13,.container14,.container15,.container16{width:728px !important;height:90px !important;}
.container21,.container22,.container23,.container24,.container25,.container26{width:468px !important;height:60px !important;}
.container31,.container32,.container33,.container34,.container35,.container36{width:200px !important;height:200px !important;}
.container41,.container42,.container43,.container44,.container45,.container46{width:250px !important;height:250px !important;}
.container51,.container52,.container53,.container54,.container55,.container56{width:300px !important;height:250px !important;}
.container61,.container62,.container63,.container64,.container65,.container66{width:336px !important;height:280px !important;}
.container71,.container72,.container73,.container74,.container75,.container76{width:120px !important;height:600px !important;}
.container81,.container82,.container83,.container84,.container85,.container86{width:160px !important;height:600px !important;}
var ms = new _IG_MultiSize();
var prefs = new _IG_Prefs();
var adWidth = 0;
var show;
var sizer = new AdSizer();
var json_data_str = prefs.getString("json_ad_data");
var data = eval('(' + json_data_str +')');
var getUrlParam = function(key) {
var keyLen = key.length;
var haystack = document.location.search.substring(1).split("&");
var i, ic = haystack.length;
for (i = 0; i ');
function waitForMultiSize() {
if (ms.getWidth() && ms.getHeight()) {
show = new SlideShow(data);
if (data["autoplay"] == 'yes') {
show.start(1);
} else {
show.start(0);
}
} else {
window.setTimeout(waitForMultiSize, WAIT_DELAY);
}
}
var WAIT_DELAY = 10;
_IG_RegisterOnloadHandler(waitForMultiSize);
}
function SlideShow(myData) {
var gadgetData = myData;
var curSlideIdx = 1;
var manualPlayback = true;
var slideDelayTimer;
var trackInteraction = function(key, val) {
if (typeof val !== "undefined") {
_ADS_ReportInteraction(key, val);
} else {
_ADS_ReportInteraction(key);
}
};
var trackClickthrough = function(e) {
trackInteraction("destination_url_1");
return true;
};
var _continuePlayback = function(flag) {
var millisecondsDelay = 4000;
if (pausedAndLastSlide()) {
millisecondsDelay = 0;
curSlideIdx = -1;
} else if (typeof flag == "undefined") {
millisecondsDelay = 0;
}
manualPlayback = false;
killTimer();
setToPause();
if (millisecondsDelay) {
slideDelayTimer = setInterval(_nextSlide, millisecondsDelay);
} else {
_nextSlide();
}
};
var _pausePlayback = function() {
manualPlayback = true;
killTimer();
setToPlay();
};
var _restartPlayback = function(auto) {
curSlideIdx = 0;
var millisecondsDelay = 4000;
_goToSlide(curSlideIdx);
if (auto) {
_continuePlayback(millisecondsDelay);
}
};
var _nextSlide = function() {
if (pausedAndLastSlide()) {
curSlideIdx = 0;
} else if (curSlideIdx = 1) {
curSlideIdx--;
} else {
curSlideIdx = gadgetData.slide.length - 1;
}
trackInteraction("previous_item")
_goToSlide(curSlideIdx);
};
function wrapVerticalAlignment(html, alignment, height_px, parent_id) {
var parent_obj = _gel(parent_id);
if (parent_obj) {
return (''
+ '' + html + '');
}
}
var _goToSlide = function(idx) {
if (idx = gadgetData.slide.length) {
return false;
}
curSlideIdx = idx;
var curSlide = gadgetData.slide[curSlideIdx];
if (!curSlide.paragraph) {
curSlide.paragraph = '';
}
if (!curSlide.headline) {
curSlide.headline = '';
}
var adInfo = sizer.sniffSize(curSlide);
var topSize = adInfo.adSize;
var subSize = adInfo.contentLayout;
slideTransition((gadgetData.transitionEffect + "Out"), function() {
sizer.setSize(topSize + "" + subSize);
var domChrome = _gel("chrome");
domChrome.style.backgroundColor = curSlide.backgroundColor;
var domContent = _gel("content");
domContent.style.color = curSlide.textColor;
domContent.style.visibility = 'hidden';
var domHeadline = _gel("headline");
domHeadline.innerHTML = curSlide.headline;
if (adInfo.adSize == 7) {
domHeadline.style.fontSize = '12pt';
} else if (adInfo.adSize == 8) {
domHeadline.style.fontSize = '14pt';
}
if (adInfo.adSize != 1 && adInfo.adSize != 2) {
if (curSlide.headline.indexOf(' ') 12) {
if (adInfo.adSize == 8) {
domHeadline.style.fontSize = Math.round((adWidth-6)/15) + 'px';
} else {
domHeadline.style.fontSize = Math.round((adWidth-6)/14) + 'px';
}
}
}
}
domHeadline.style.color = curSlide.textColor;
domHeadline.style.backgroundColor = curSlide.backgroundColor;
if (adInfo.adSize == 6) {
domHeadline.style.left = '-3px';
}
domHeadline.style.visibility = 'visible';
var domParagraph = _gel("paragraph");
if ( adInfo.adSize != 1) {
domParagraph.innerHTML = curSlide.paragraph;
} else {
domParagraph.innerHTML =
wrapVerticalAlignment(curSlide.paragraph, 'center', 56, "paragraph");
}
domParagraph.style.backgroundColor = curSlide.backgroundColor;
domParagraph.style.visibility = 'visible';
var domImage = _gel("image");
domImage.style.height = "";
domImage.style.width = "";
domImage.onload = function(e) {
var adInfo = sizer.sniffSize(curSlide, domImage);
var newSize = adInfo["contentLayout"];
sizer.setSize(topSize + "" + newSize);
sizer.fitInBox.call(this, {offset: -2});
this.style.visibility = 'visible';
};
if (curSlide.preload) {
domImage.src = curSlide.preload.src;
} else if (curSlide.image) {
domImage.src = decodeURIComponent(curSlide.image);
curSlide.preload = getPreloadedImage(domImage.src);
}
var nextSlide = gadgetData.slide[curSlideIdx + 1];
if (nextSlide && nextSlide.image && !nextSlide.preload) {
nextSlide.preload = getPreloadedImage(nextSlide.image);
}
domContent.style.visibility = 'visible';
slideTransition((gadgetData.transitionEffect + "In"), function() {
if (!paused()) {
_continuePlayback("auto");
}
});
});
};
function getPreloadedImage(src) {
var img = document.createElement("img");
img.src = decodeURIComponent(src);
return img;
}
function killTimer() {
if (slideDelayTimer) {
clearInterval(slideDelayTimer);
}
}
function pausedAndLastSlide() {
if (paused() && curSlideIdx == gadgetData.slide.length - 1) {
return true;
}
return false;
};
function paused() {
return manualPlayback;
}
function setToPlay() {
var playPause = _gel("playPause");
playPause.src = gadgetData.gadgetDataUrl + "play.png";
playPause.onclick = function() {
_continuePlayback();
};
playPause.onmouseover = function() {
this.src = gadgetData.gadgetDataUrl + "play.active.png";
};
playPause.onmouseout = function() {
this.src = gadgetData.gadgetDataUrl + "play.png";
};
}
function setToPause() {
var playPause = _gel("playPause");
playPause.src = gadgetData.gadgetDataUrl + "pause.png";
playPause.onclick = _pausePlayback;
playPause.onmouseover = function() {
this.src = gadgetData.gadgetDataUrl + "pause.active.png";
};
playPause.onmouseout = function() {
this.src = gadgetData.gadgetDataUrl + "pause.png";
};
}
function addHtml() {
var container = document.createElement("div");
container.id = "container";
var chrome = document.createElement("div");
chrome.id = "chrome";
var content = document.createElement("div");
content.id = "content";
content.style.cursor = "pointer";
content.onclick = function() {
_ADS_ReportInteractionClick(data.destinationUrl,'destination_url_1');
};
var headline = document.createElement("a");
headline.id = "headline";
var imageBox = document.createElement("div");
imageBox.id = "imageBox";
var image = document.createElement("img");
image.id = "image";
image.style.visibility = 'hidden';
var paragraph = document.createElement("p");
paragraph.id = "paragraph";
var controls = document.createElement("div");
controls.id = "controls";
var linkBack = document.createElement("a");
linkBack.href = "javascript:_ADS_ReportInteractionClick('" +
data.destinationUrl + "','destination_url_1')";
linkBack.id = "linkBack";
if (adWidth == 120) {
linkBack.style.fontSize = '10px';
linkBack.style.left = '1px';
} else if (adWidth == 160) {
linkBack.style.fontSize = '10px';
} else if (adWidth == 250) {
linkBack.style.fontSize = '10px';
} else if (adWidth == 468) {
linkBack.style.fontSize = '10px';
}
linkBack.appendChild(document.createTextNode(gadgetData.displayUrl));
var playPause = document.createElement("img");
playPause.id = "playPause";
playPause.src = gadgetData.gadgetDataUrl + "play.png";
playPause.onmouseover = function() {
this.src = gadgetData.gadgetDataUrl + "play.active.png";
};
playPause.onmouseout = function() {
this.src = gadgetData.gadgetDataUrl + "play.png";
};
var abgImage = getAdsByGoogleImage();
abgImage.id = "abgImage";
abgImage.style.display = "inline";
abgImage.style.visibility = "visible";
abgImage.style.cursor = "pointer";
abgImage.onclick = function () {
window.open(prefs.getString('abgurl'),'','status=1,toolbar=1,location=1,menubar=1,resizable=1,scrollbars=1');
}
var slideNext = document.createElement("div");
slideNext.id = "slideNext";
slideNext.style.background = "transparent url(" + (gadgetData.gadgetDataUrl + "next.png") + ") no-repeat center -15px";
slideNext.onmouseover = function() {
this.style.background = "transparent url(" + (gadgetData.gadgetDataUrl + "next.png") + ") no-repeat center 0px";
}
slideNext.onmouseout = function() {
this.style.background = "transparent url(" + (gadgetData.gadgetDataUrl + "next.png") + ") no-repeat center -15px";
}
var slidePrev = document.createElement("div");
slidePrev.id = "slidePrev";
slidePrev.style.background = "transparent url(" + (gadgetData.gadgetDataUrl + "previous.png") + ") no-repeat center -15px";
slidePrev.onmouseover = function() {
this.style.background = "transparent url(" + (gadgetData.gadgetDataUrl + "previous.png") + ") no-repeat center 0px";
}
slidePrev.onmouseout = function() {
this.style.background = "transparent url(" + (gadgetData.gadgetDataUrl + "previous.png") + ") no-repeat center -15px";
}
controls.appendChild(playPause);
controls.appendChild(slidePrev);
controls.appendChild(slideNext);
controls.appendChild(abgImage);
imageBox.appendChild(image);
content.appendChild(headline);
content.appendChild(imageBox);
content.appendChild(paragraph);
container.appendChild(chrome);
container.appendChild(content);
container.appendChild(controls);
container.appendChild(linkBack);
document.getElementsByTagName("body")[0].appendChild(container);
sizer.setSize(sizer.getSize());
};
function slideTransition(type, callback) {
var dom = _gel("content");
var workFunc = null;
var workParams = {};
if (type.indexOf("none") == 0) {
workFunc = function(params) {
dom.style.visibility = params.newVisibility;
if (typeof callback === "function") {
callback();
}
};
if (type == "noneOut") {
workParams["newVisibility"] = "hidden";
} else if (type == "noneIn") {
workParams["newVisibility"] = "visible";
}
} else if(type.indexOf("wipe_right") == 0) {
workFunc = function(params) {
var left = params.left;
var end = params.end;
var step = params.step;
var delay = params.delay;
function f() {
dom.style.left = left;
if (left != end) {
left += step;
setTimeout(f, delay);
} else if (typeof callback === "function") {
callback();
}
}
f();
}
var step = 50;
if(type == "wipe_rightOut") {
var newEnd = Math.ceil(_gel("container").clientWidth / step) * step;
workParams = {
left : parseInt(dom.style.left) 0,
end : newEnd,
step : step,
delay: 30
};
} else if(type == "wipe_rightIn") {
workParams = {
SoundPLAN

SoundPLAN is a complete software package offering a full spectrum of noise and air pollution evaluation modules.

www.machoy-acoustics.com

left : parseInt(dom.style.left) 0,
end : 0,
step : -step,
delay: 30
};
}
} else if (type.indexOf("wipe_left") == 0) {
workFunc = function(params) {
var left = params.left;
var step = params.step;
var end = Math.round(params.end / step) * step;
var delay = params.delay;
var width = params.width;
function f() {
dom.style.left = left;
if (left != end) {
left += step;
setTimeout(f, delay);
} else if (typeof callback === "function") {
callback();
}
}
f();
}
var step = 50;
if(type == "wipe_leftOut") {
workParams = {
left : parseInt(dom.style.left) 0,
end : -dom.clientWidth,
step : -step,
delay: 30
};
} else if(type == "wipe_leftIn") {
workParams = {
left : parseInt(dom.style.left) 0,
end : 0,
step : step,
delay: 30
};
}
} else if (type.indexOf("dissolve") == 0) {
workFunc = function(params) {
var opacityCurrent = params.opacityStart;
var opacityEnd = params.opacityEnd;
var opacityStep = params.opacityStep
var delay = params.delay;
var callback = params.callback;
function f() {
if (typeof dom.style.filter !== "undefined") {
dom.style.filter = "alpha(opacity=" + opacityCurrent + ")";
} else {
dom.style.opacity = opacityCurrent / 100;
}
if (opacityCurrent != opacityEnd) {
opacityCurrent += opacityStep;
setTimeout(f, delay);
} else if (typeof callback === "function") {
callback();
}
}
f();
}
if (type == "dissolveOut") {
workParams = {
opacityStart : 100,
opacityEnd : 0,
opacityStep : -10,
delay : 30
};
} else if (type == "dissolveIn") {
workParams = {
opacityStart : 0,
opacityEnd : 100,
opacityStep : 10,
delay : 30
};
}
}
workParams["callback"] = callback;
if (typeof workFunc === "function") {
workFunc(workParams);
}
}
function getAdsByGoogleImage() {
var image = document.createElement("img");
var imageSrc = "http://pagead2.googlesyndication.com/pagead/abglogo/abg-en-100c-000000.png";
image.src = imageSrc;
image.height = 16;
image.width = 78;
image.id = 'adsby';
image.alt = prefs.getMsg('adsby'); // "Ads by Google";
/*@cc_on
var box = document.createElement("span");
box.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader (src='" + imageSrc + "', sizingMethod='crop');";
box.style.display = "inline-block";
box.style.height = "16px";
box.style.width = "78px";
image.style.filter = "progid:DXImageTransform.Microsoft.Alpha(opacity=0)";
box.appendChild(image);
return box;
@*/
return image;
}
function getPos(obj) {
if (!obj) {
return null;
}
var x = 0
var y = 0;
do {
x += obj.offsetLeft;
y += obj.offsetTop;
obj = obj.offsetParent;
}
while(obj);
return {"x":x, "y":y};
}
function init() {
addHtml();
setToPlay();
var slideNext = _gel("slideNext");
slideNext.onclick = function(e) {
_pausePlayback();
_nextSlide();
};
var slidePrev = _gel("slidePrev");
slidePrev.onclick = function(e) {
_pausePlayback();
_prevSlide();
};
};
init();
return {
play : _continuePlayback,
pause : _pausePlayback,
next : _nextSlide,
prev : _prevSlide,
start : _restartPlayback,
slide : _goToSlide
};
}
function AdSizer() {
var sizes = {
LEADERBOARD : 1,
BANNER : 2,
SMALL_SQUARE : 3,
SQUARE : 4,
MEDIUM_RECTANGLE : 5,
LARGE_RECTANGLE : 6,
SKYSCRAPER : 7,
WIDE_SKYSCRAPER : 8
};
var _fitInBox = function(params) {
if (typeof params === "undefined") {
params = {};
}
if (typeof params.offset === "undefined") {
params.offset = 0;
}
var obj = this;
var objW = obj.offsetWidth;
var objH = obj.offsetHeight;
if (objW 0) {
var cname = _gel("container").className;
cname = cname.substr(0,cname.length - 1) + '1';
_gel("container").className = cname;
}
var parW = par.offsetWidth + params.offset;
var parH = par.offsetHeight + params.offset;
if (parW parW objH > parH) {
delta = Math.max(objW / parW, objH / parH);
var newW = Math.round(objW / delta);
var newH = Math.round(objH / delta);
if (!isNaN(newW) && !isNaN(newH)) {
obj.style.width = newW + "px";
obj.style.height = newH + "px";
}
}
};
var _sniffSize = function() {
var answer = {};
var w = ms.getWidth();
adWidth = w;
var h = ms.getHeight();
var maxParagraphLength = 150;
if (w == 728 && h == 90) {
answer.adSize = sizes.LEADERBOARD;
} else if (w == 468 && h == 60) {
answer.adSize = sizes.BANNER;Ads by Google
maxParagraphLength = 80;
} else if (w == 200 && h == 200) {
answer.adSize = sizes.SMALL_SQUARE;
maxParagraphLength = 135;
} else if (w == 250 && h == 250) {
answer.adSize = sizes.SQUARE;
} else if (w == 300 && h == 250) {
answer.adSize = sizes.MEDIUM_RECTANGLE;
} else if (w == 336 && h == 280) {
answer.adSize = sizes.LARGE_RECTANGLE;
} else if (w == 120 && h == 600) {
answer.adSize = sizes.SKYSCRAPER;
} else if (w == 160 && h == 600) {
answer.adSize = sizes.WIDE_SKYSCRAPER;
} else {
answer.adSize = sizes.WIDE_SKYSCRAPER;
}
answer.contentLayout = 4;
var s = arguments[0] null;
var i = arguments[1] null;
if (s) {
if ((s.headline && s.image && s.paragraph) && s.paragraph.length 1) {
answer.contentLayout += 4;
}
}
return answer;
};
var _setSize = function(newSize) {
block = _gel("container");
block.className = block.className.replace(block.id + currSize, "") +
" " + block.id + newSize;
currSize = newSize;
};
var currSize = _sniffSize()["adSize"];
return {
setSize : _setSize,
getSize : function() {
return currSize;
},
sniffSize : _sniffSize,
fitInBox : _fitInBox
};
}
SoundPLAN
SoundPLAN is a complete software package offering a full spectrum of noise and air pollution evaluation modules.

www.machoy-acoustics.com

No comments:

Post a Comment