var aaa=0;
if(typeof (k_push_vars)=="undefined"){
k_push_vars={};
}
var k_push={"popup_w":400,"popup_h":150,"myWidth":0,"myHeight":0,"popup_open":false,"counter":0,"lastPosy":null,"getSize":function(){
if(typeof (window.innerWidth)=="number"){
k_push.myWidth=window.innerWidth;
k_push.myHeight=window.innerHeight;
}else{
if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){
k_push.myWidth=document.documentElement.clientWidth;
k_push.myHeight=document.documentElement.clientHeight;
}else{
if(document.body&&(document.body.clientWidth||document.body.clientHeight)){
k_push.myWidth=document.body.clientWidth;
k_push.myHeight=document.body.clientHeight;
}
}
}
},"getScrollY":function(){
var _1=0;
if(typeof (window.pageYOffset)=="number"){
_1=window.pageYOffset;
}else{
if(document.body&&(document.body.scrollTop)){
_1=document.body.scrollTop;
}else{
if(document.documentElement&&(document.documentElement.scrollTop)){
_1=document.documentElement.scrollTop;
}
}
}
return _1;
},"mousePos":function(e){
if(k_push.popup_open){
return;
}
k_push.getSize();
var _3=0;
if(!e){
var e=window.event;
}
if(e.pageX||e.pageY){
_3=e.pageY;
}else{
if(e.clientX||e.clientY){
_3=e.clientY+k_push.getScrollY();
}
}
aaa=k_push.myHeight/2-k_push.popup_h/2+document.body.scrollTop;
if(k_push.lastPosy==null){
k_push.lastPosy=_3;
}else{
if(k_push.lastPosy<_3){
k_push.lastPosy=_3;
}else{
if(_3<k_push.getScrollY()+15){
k_push.openPopup();
}
}
}
},"popup_init":function(){
document.onmousemove=k_push.mousePos;
var _4=document.createElement("div");
_4.setAttribute("id","k_maskBG");
document.body.appendChild(_4);
var _5=document.createElement("div");
_5.setAttribute("id","k_popup");
_5.style.width=k_push.popup_w+"px";
_5.style.height=k_push.popup_h+"px";
_5.style.position="absolute";
_5.style.top="0px";
_5.style.left="0px";
_5.style.zIndex="9999";
_5.style.fontFamily="arial";
_5.style.fontWeight="bold";
_5.style.color=(k_push_vars.popup_font_color)?k_push_vars.popup_font_color:"#000000";
k_push.ff_link_id=(k_push_vars.ff_link_id)?k_push_vars.ff_link_id:"kampylink";
k_push.header=(k_push_vars.header)?k_push_vars.header:"Your feedback is important to us!";
k_push.question=(k_push_vars.question)?k_push_vars.question:"Would you be willing to give us a short (1 minute) feedback?";
k_push.footer=(k_push_vars.footer)?k_push_vars.footer:"Thank you for helping us improve our website";
k_push.yes=(k_push_vars.yes)?k_push_vars.yes:"Yes";
k_push.no=(k_push_vars.no)?k_push_vars.no:"No";
k_push.yes_background=(k_push_vars.yes_background)?k_push_vars.yes_background:"#76AC78";
k_push.no_background=(k_push_vars.no_background)?k_push_vars.no_background:"#8D9B86";
k_push.dir=(k_push_vars.text_direction=="rtl")?"rtl":"ltr";
if(k_push.dir=="ltr"){
k_push.yes_float="left";
k_push.no_float="right";
}else{
k_push.yes_float="right";
k_push.no_float="left";
}
k_push.images_dir=(k_push_vars.images_dir)?k_push_vars.images_dir:"/images/";
_5.innerHTML="<div style='border-bottom: 1px solid #ffffff; text-align: center; font-size: 20px; padding: 10px; direction:"+k_push.dir+"'><strong>"+k_push.header+"</strong></div><div style='border-bottom: 1px solid #ffffff; font-size: 11px; padding: 10px 0 10px 0; text-align: center; direction:"+k_push.dir+"'>"+k_push.question+"<div style='margin: 0 auto; width: 138px; padding: 10px 0 0 0;'><a style='background-color:"+k_push.yes_background+";border-color:#D9DFEA rgb(14, 31, 91) rgb(14, 31, 91) rgb(217, 223, 234);border-style:solid;border-width:1px;padding:2px 15px 3px;text-align:center;font-size:11px;font-weight: bold; text-decoration: none; color: black; width: 26px; float: "+k_push.yes_float+";' href='javascript: void(0)' onclick='document.getElementById(\""+k_push.ff_link_id+"\").onclick();k_push.closePopup(); k_push.increaseCount(1); return false;'>"+k_push.yes+"</a><a style='background-color:"+k_push.no_background+";border-color:#D9DFEA rgb(14, 31, 91) rgb(14, 31, 91) rgb(217, 223, 234);border-style:solid;border-width:1px;padding:2px 15px 3px;text-align:center;font-size:11px;font-weight: bold; text-decoration: none; color: black;  width: 26px; float: "+k_push.no_float+";' href='javascript: void(0)' onclick='k_push.closePopup(); k_push.increaseCount(0); return false;'>"+k_push.no+"</a><div style='clear:both'></div></div></div><div style='font-size: 11px; padding: 10px 0 6px 0; text-align: center; direction:"+k_push.dir+"'>"+k_push.footer+"</div>";
_5.style.background=(k_push_vars.popup_background)?k_push_vars.popup_background:"#D0DDE5";
_5.style.display="none";
document.body.appendChild(_5);
},"openPopup":function(){
k_push.Set_Cookie("k_push8","1","21","/","","");
if((k_push.popup_open)||(k_push.counter>0)||(!document.getElementById(k_push.ff_link_id))){
return;
}
k_push.counter++;
k_push.popup_open=true;
var _6=document.getElementById("k_maskBG");
var _7=document.getElementById("k_popup");
var _8=document.documentElement.scrollTop||document.body.scrollTop;
_7.style.top=(k_push.myHeight/2)-(k_push.popup_h/2)+_8+"px";
_7.style.left=k_push.myWidth/2-k_push.popup_w/2+"px";
_7.style.display="block";
_6.innerHTML="<div style=\"width: 100%; height: 100%; opacity: .7; filter: alpha(opacity=70); background-color:transparent !important;\tbackground-color: #333333; background-image/**/: url('"+k_push.images_dir+"maskBG.png') !important; background-image:none; background-repeat: repeat;\"></div>";
_6.style.position="absolute";
_6.style.top="0px";
_6.style.left="0px";
_6.style.zIndex="998";
_6.style.width=document.body.scrollWidth+"px";
var h=(document.documentElement.scrollHeight>document.body.scrollHeight)?document.documentElement.scrollHeight:document.body.scrollHeight;
_6.style.height=h+"px";
_6.style.display="block";
if(document.all){
k_push.toggleSelects("hidden");
}
},"closePopup":function(){
k_push.popup_open=false;
var _a=document.getElementById("k_maskBG");
var _b=document.getElementById("k_popup");
_b.style.display="none";
_a.style.display="none";
if(document.all){
k_push.toggleSelects("visible");
}
},"Set_Cookie":function(_c,_d,_e,_f,_10,_11){
var _12=new Date();
_12.setTime(_12.getTime());
if(_e){
_e=_e*1000*60*60*24;
}
var _13=new Date(_12.getTime()+(_e));
document.cookie=_c+"="+escape(_d)+((_e)?";expires="+_13.toGMTString():"")+((_f)?";path="+_f:"")+((_10)?";domain="+_10:"")+((_11)?";secure":"");
},"Get_Cookie":function(_14){
var _15=document.cookie.indexOf(_14+"=");
var len=_15+_14.length+1;
if((!_15)&&(_14!=document.cookie.substring(0,_14.length))){
return null;
}
if(_15==-1){
return null;
}
var end=document.cookie.indexOf(";",len);
if(end==-1){
end=document.cookie.length;
}
return unescape(document.cookie.substring(len,end));
},"toggleSelects":function(_18){
try{
var _19=document.getElementsByTagName("select");
for(i=0;i<_19.length;i++){
_19[i].style.visibility=_18;
}
}
catch(err){
}
},"increaseCount":function(_1a){
try{
if(k_push_vars.site_code){
var i=new Image(1,1);
i.src="http://www.kampyle.com/feedback_form/push/count_push.php?site_code="+k_push_vars.site_code+"&choice="+_1a;
i.onload=function(){
};
}
}
catch(err){
}
}};
k_push.n=(typeof(k_push_vars.view_percentage)!='undefined'&&((k_push_vars.view_percentage>=0)&&(k_push_vars.view_percentage<=100)))?k_push_vars.view_percentage:10;
if(((k_push.n==null)||(((Math.random()*100)<k_push.n)))){
if(!k_push_vars.disable_cookie){
if(!k_push.Get_Cookie("k_push8")){
if(window.addEventListener){
window.addEventListener("load",k_push.popup_init,false);
}else{
window.attachEvent("onload",k_push.popup_init);
}
}
}else{
if(window.addEventListener){
window.addEventListener("load",k_push.popup_init,false);
}else{
window.attachEvent("onload",k_push.popup_init);
}
}
}
