

var DealList_xmlHttp
var sopac=40
var sopac1=0.40
var eopac=90
var eopac1=0.90
var DealList_RespID
function AJAX_ShowDealListSuggestion(respid,pagename){
DealList_RespID=respid
document.getElementById(DealList_RespID).style.opacity=sopac1
document.getElementById(DealList_RespID).style.filter='alpha(opacity='+sopac+')'
document.getElementById(DealList_RespID).style.mozOpacity=sopac1
document.getElementById(DealList_RespID).style.khtmlOpacity=sopac1
DealList_xmlHttp=DEAL_GetXmlHttpObject()
if(DealList_xmlHttp==null){
alert("Browser does not support HTTP Request")
return}
var dealurl=SITEURL+pagename
DealList_xmlHttp.onreadystatechange=stateAJAX_ShowDealList
DealList_xmlHttp.open("GET",dealurl,true)
DealList_xmlHttp.send(null)}
function AJAX_ShowDealList(respid,pagename,catid,subcatid,type,day,keyword){
DealList_RespID=respid
if(document.getElementById('AJAXLOADID')){document.getElementById('AJAXLOADID').style.display='block';}
document.getElementById(DealList_RespID).style.opacity=sopac1
document.getElementById(DealList_RespID).style.filter='alpha(opacity='+sopac+')'
document.getElementById(DealList_RespID).style.mozOpacity=sopac1
document.getElementById(DealList_RespID).style.khtmlOpacity=sopac1
DealList_xmlHttp=DEAL_GetXmlHttpObject()
if(DealList_xmlHttp==null){
alert("Browser does not support HTTP Request")
return}
var dealurl=SITEURL+pagename+"?catid="+catid+"&subcatid="+subcatid+"&type="+type
if(day)
dealurl=dealurl+"&day="+day
if(keyword)
dealurl=dealurl+"&keyword="+keyword
DealList_xmlHttp.onreadystatechange=stateAJAX_ShowDealList
DealList_xmlHttp.open("GET",dealurl,true)
DealList_xmlHttp.send(null)}
function stateAJAX_ShowDealList(){
if(DealList_xmlHttp.readyState==4 || DealList_xmlHttp.readyState=="complete"){
document.getElementById(DealList_RespID).innerHTML=DealList_xmlHttp.responseText
document.getElementById(DealList_RespID).style.opacity=''
document.getElementById(DealList_RespID).style.filter=''
document.getElementById(DealList_RespID).style.mozOpacity=''
document.getElementById(DealList_RespID).style.khtmlOpacity=''
if(document.getElementById('AJAXLOADID')){document.getElementById('AJAXLOADID').style.display='none';}
}}
function AJAX_ShowMyDealList(respid,pagename,type,mid){
DealList_RespID=respid
document.getElementById(DealList_RespID).style.opacity=sopac1
document.getElementById(DealList_RespID).style.filter='alpha(opacity='+sopac+')'
document.getElementById(DealList_RespID).style.mozOpacity=sopac1
document.getElementById(DealList_RespID).style.khtmlOpacity=sopac1
DealList_xmlHttp=DEAL_GetXmlHttpObject()
if(DealList_xmlHttp==null){
alert("Browser does not support HTTP Request")
return}
var dealurl=SITEURL+pagename+"?type="+type+"&mid="+mid
DealList_xmlHttp.onreadystatechange=stateAJAX_ShowMyDealList
DealList_xmlHttp.open("GET",dealurl,true)
DealList_xmlHttp.send(null)}
function stateAJAX_ShowMyDealList(){
if(DealList_xmlHttp.readyState==4 || DealList_xmlHttp.readyState=="complete"){
document.getElementById(DealList_RespID).innerHTML=DealList_xmlHttp.responseText
document.getElementById(DealList_RespID).style.opacity=''
document.getElementById(DealList_RespID).style.filter=''
document.getElementById(DealList_RespID).style.mozOpacity=''
document.getElementById(DealList_RespID).style.khtmlOpacity=''}}
function DEAL_GetXmlHttpObject(){
var DealList_xmlHttp=null
try{
DealList_xmlHttp=new XMLHttpRequest()}
catch(e){
try{
DealList_xmlHttp=new ActiveXObject("Msxml2.XMLHTTP")}
catch(e){
DealList_xmlHttp=new ActiveXObject("Microsoft.XMLHTTP")}}
return DealList_xmlHttp}


var LootBoot_xmlHttp
var LootBoot_resp
var LootBoot_ID
var LootBoot_TYPE
function PostLootBoot(id,mid,type,respid,parm1,lootval,bootval){
LootBoot_resp=respid
LootBoot_ID=id
LootBoot_TYPE=type
if(document.getElementById("LBFLASH"+LootBoot_ID)){
lootval=parseInt(lootval)
bootval=parseInt(bootval)
if(LootBoot_TYPE=='loot'){
CalculateVote("LBFLASH"+LootBoot_ID,'true')
LOOTRESULT=parseInt(((lootval+1)/(lootval+bootval+1))*100)
document.getElementById(LootBoot_resp).innerHTML='<div class="BodyBtSelect"><div class="BodyBtSelectContent" style="padding-top:3px;"><img src="images/loot.png" alt="logo" width="14" height="16" /></div><div class="BodyBtSelectTxt Light12Bold Green" style="padding-top:5px;">'+LOOTRESULT+'% Looted</div></div>'}
if(LootBoot_TYPE=='boot'){
CalculateVote("LBFLASH"+LootBoot_ID,'false')
BOOTRESULT=parseInt(((bootval+1)/(lootval+bootval+1))*100)
document.getElementById(LootBoot_resp).innerHTML='<div class="BodyBtSelect"><div class="BodyBtSelectContent" style="padding-top:3px;"><img src="images/boot.png" alt="logo" width="14" height="16" /></div><div class="BodyBtSelectTxt Light12Bold  Blue" style="padding-top:5px;">'+BOOTRESULT+'% Booted</div></div>'}}
LootBoot_xmlHttp=LootBoot_GetXmlHttpObject()
if(LootBoot_xmlHttp==null){
alert("Browser does not support HTTP Request")
return}
var LootBootURL=SITEURL+"ajax_response/lootboot.php?id="+id+"&type="+type+"&mid="+mid
if(parm1&&parm1!='')
LootBootURL=LootBootURL+"&url_cookie="+parm1
LootBoot_xmlHttp.onreadystatechange=statePostLootBoot
LootBoot_xmlHttp.open("GET",LootBootURL,true)
LootBoot_xmlHttp.send(null)}
function statePostLootBoot(){
if(LootBoot_xmlHttp.readyState==4 || LootBoot_xmlHttp.readyState=="complete"){}}
function PostCouponLootBoot(id,mid,type,respid){
LootBoot_resp=respid
LootBoot_ID=id
LootBoot_TYPE=type
LootBoot_xmlHttp=LootBoot_GetXmlHttpObject()
if(LootBoot_xmlHttp==null){
alert("Browser does not support HTTP Request")
return}
var LootBootURL=SITEURL+"ajax_response/coupons_lootboot.php?id="+id+"&type="+type+"&mid="+mid
LootBoot_xmlHttp.onreadystatechange=statePostCouponLootBoot
LootBoot_xmlHttp.open("GET",LootBootURL,true)
LootBoot_xmlHttp.send(null)}
function statePostCouponLootBoot(){
if(LootBoot_xmlHttp.readyState==4 || LootBoot_xmlHttp.readyState=="complete"){
result=LootBoot_xmlHttp.responseText
document.getElementById(LootBoot_resp).innerHTML=result
if(document.getElementById("LBFLASH"+LootBoot_ID)){
if(LootBoot_TYPE=='loot')
CalculateVote("LBFLASH"+LootBoot_ID,'true')
if(LootBoot_TYPE=='boot')
CalculateVote("LBFLASH"+LootBoot_ID,'false')}}}
function LootBoot_GetXmlHttpObject(){
var LootBoot_xmlHttp=null
try{
LootBoot_xmlHttp=new XMLHttpRequest()}
catch(e){
try{
LootBoot_xmlHttp=new ActiveXObject("Msxml2.XMLHTTP")}
catch(e){
LootBoot_xmlHttp=new ActiveXObject("Microsoft.XMLHTTP")}}
return LootBoot_xmlHttp}
function CalculateVote(lootbootid,loot){
var obj=thisMovie(lootbootid)
obj.apply_vote(loot)}
function thisMovie(movieName){
if(document.embeds[movieName])
return document.embeds[movieName]
if(window.document[movieName])
return window.document[movieName]
if(window[movieName])
return window[movieName]
if(document[movieName])
return document[movieName]
return}


var TSB_xmlHttp
var LB_xmlHttp
var sopac=40
var sopac1=0.40
var eopac=90
var eopac1=0.90
var TSB_RespID
function ShowTopStoresBrand(respid,pagename,type){
TSB_RespID=respid
document.getElementById(TSB_RespID).style.opacity=sopac1
document.getElementById(TSB_RespID).style.filter='alpha(opacity='+sopac+')'
document.getElementById(TSB_RespID).style.mozOpacity=sopac1
document.getElementById(TSB_RespID).style.khtmlOpacity=sopac1
TSB_xmlHttp=TSB_GetXmlHttpObject()
if(TSB_xmlHttp==null){
alert("Browser does not support HTTP Request")
return}
var topurl=pagename+"?type="+type
TSB_xmlHttp.onreadystatechange=stateAJAX_ShowTSB
TSB_xmlHttp.open("GET",topurl,true)
TSB_xmlHttp.send(null)}
function stateAJAX_ShowTSB(){
if(TSB_xmlHttp.readyState==4 || TSB_xmlHttp.readyState=="complete"){
document.getElementById(TSB_RespID).innerHTML=TSB_xmlHttp.responseText
document.getElementById(TSB_RespID).style.opacity=''
document.getElementById(TSB_RespID).style.filter=''
document.getElementById(TSB_RespID).style.mozOpacity=''
document.getElementById(TSB_RespID).style.khtmlOpacity=''}}
function ShowLatestBuzz(respid,pagename){
LB_RespID=respid
document.getElementById(LB_RespID).style.opacity=sopac1
document.getElementById(LB_RespID).style.filter='alpha(opacity='+sopac+')'
document.getElementById(LB_RespID).style.mozOpacity=sopac1
document.getElementById(LB_RespID).style.khtmlOpacity=sopac1
LB_xmlHttp=LB_GetXmlHttpObject()
if(LB_xmlHttp==null){
alert("Browser does not support HTTP Request")
return}
var topurl=pagename
LB_xmlHttp.onreadystatechange=stateAJAX_ShowLB
LB_xmlHttp.open("GET",topurl,true)
LB_xmlHttp.send(null)}
function stateAJAX_ShowLB(){
if(LB_xmlHttp.readyState==4 || LB_xmlHttp.readyState=="complete"){
document.getElementById(LB_RespID).innerHTML=LB_xmlHttp.responseText
document.getElementById(LB_RespID).style.opacity=''
document.getElementById(LB_RespID).style.filter=''
document.getElementById(LB_RespID).style.mozOpacity=''
document.getElementById(LB_RespID).style.khtmlOpacity=''}}
function ChangeStoreBrandNav(selectID,unselectID){
document.getElementById(selectID).style.display=''
document.getElementById(unselectID).style.display='none'}
function TSB_GetXmlHttpObject(){
var TSB_xmlHttp=null
try{
TSB_xmlHttp=new XMLHttpRequest()}
catch(e){
try{
TSB_xmlHttp=new ActiveXObject("Msxml2.XMLHTTP")}
catch(e){
TSB_xmlHttp=new ActiveXObject("Microsoft.XMLHTTP")}}
return TSB_xmlHttp}
function LB_GetXmlHttpObject(){
var LB_xmlHttp=null
try{
LB_xmlHttp=new XMLHttpRequest()}
catch(e){
try{
LB_xmlHttp=new ActiveXObject("Msxml2.XMLHTTP")}
catch(e){
LB_xmlHttp=new ActiveXObject("Microsoft.XMLHTTP")}}
return LB_xmlHttp}


var AP_xmlHttp
var pageid
var sopac=40
var sopac1=0.40
var eopac=90
var eopac1=0.90
var RespID
var PageURL
function showpaging(pid,pagename){
RespID=pid
pagename = pagename.replace(/SPACESEPERATOR/g," ");
PageURL=pagename
PageURL=PageURL.split("?")
document.getElementById(RespID).style.opacity=sopac1
document.getElementById(RespID).style.filter='alpha(opacity='+sopac+')'
document.getElementById(RespID).style.mozOpacity=sopac1
document.getElementById(RespID).style.khtmlOpacity=sopac1
AP_xmlHttp=AP_GetXmlHttpObject()
if(AP_xmlHttp==null){
alert("Browser does not support HTTP Request")
return}
var url=SITEURL+pagename; 
AP_xmlHttp.onreadystatechange=showpagingchange
AP_xmlHttp.open("GET",url,true)
AP_xmlHttp.send(null)}
function showpagingchange(){
if(AP_xmlHttp.readyState==4 || AP_xmlHttp.readyState=="complete"){
document.getElementById(RespID).innerHTML=AP_xmlHttp.responseText
document.getElementById(RespID).style.opacity=''
document.getElementById(RespID).style.filter=''
document.getElementById(RespID).style.mozOpacity=''
document.getElementById(RespID).style.khtmlOpacity=''
if(PageURL[0]=="messagebox.php" || PageURL[0]=="dealcomment.php"){}
else{
window.scroll(0,0)}}}
function AP_GetXmlHttpObject(){
var AP_xmlHttp=null
try{
AP_xmlHttp=new XMLHttpRequest()}
catch(e){
try{
AP_xmlHttp=new ActiveXObject("Msxml2.XMLHTTP")}
catch(e){
AP_xmlHttp=new ActiveXObject("Microsoft.XMLHTTP")}}
return AP_xmlHttp}


var xmlHttpDealCatSubcat
function AJAX_AssignCat(id){
if(document.getElementById("dealCatid"))
document.getElementById("dealCatid").value=id}
function AJAX_DealCatList(id,subcatid){
if(document.getElementById("dealCatid"))
document.getElementById("dealCatid").value=id
xmlHttpDealCatSubcat=GetXmlHttpObjectDCSC()
if(xmlHttpDealCatSubcat==null){
alert("Browser does not support HTTP Request")
return}
if(subcatid)
var url=SITEURL+"ajax_response/dealSubCatList.php?id="+id+"&subcatid="+subcatid
else
var url=SITEURL+"ajax_response/dealSubCatList.php?id="+id
xmlHttpDealCatSubcat.onreadystatechange=stateDealCatList
xmlHttpDealCatSubcat.open("GET",url,true)
xmlHttpDealCatSubcat.send(null)}
function stateDealCatList(){
if(xmlHttpDealCatSubcat.readyState==4 || xmlHttpDealCatSubcat.readyState=="complete"){
result=xmlHttpDealCatSubcat.responseText
document.getElementById('DealSubCatListID').innerHTML=result}}
function AJAX_DealSubCatList(id){
document.getElementById("dealSubCatid").value=id}
function GetXmlHttpObjectDCSC(){
var xmlHttpDealCatSubcat=null
try{
xmlHttpDealCatSubcat=new XMLHttpRequest()}
catch(e){
try{
xmlHttpDealCatSubcat=new ActiveXObject("Msxml2.XMLHTTP")}
catch(e){
xmlHttpDealCatSubcat=new ActiveXObject("Microsoft.XMLHTTP")}}
return xmlHttpDealCatSubcat}
function refreshcontent(){
xmlHttpDealCatSubcat=GetXmlHttpObjectDCSC()
if(xmlHttpDealCatSubcat==null){
alert("Browser does not support HTTP Request")
return}
var url=SITEURL+"twitter/refresh_twitter_data.php"
xmlHttpDealCatSubcat.onreadystatechange=contentrefreshfortwitter
xmlHttpDealCatSubcat.open("GET",url,true)
xmlHttpDealCatSubcat.send(null)}
function contentrefreshfortwitter(){
if(xmlHttpDealCatSubcat.readyState==4 || xmlHttpDealCatSubcat.readyState=="complete"){
result=xmlHttpDealCatSubcat.responseText
var rl=SITEURL+"twitter/refresh_tweets.php"
var msg="There are "+result+" new deals available. <a onclick=AJAX_ShowDealList('RECENTLOOTID','recent_loot.php');ChangeLootNavigation('LOOTNav1','LOOTNav2');>Refresh</a> to view. "
if(parseInt(result)>0&&document.getElementById('rcontent'))
document.getElementById('rcontent').innerHTML=msg}}


var ADD2WISHLIST_xmlHttp
var ADD2WISHLIST_TYPE
function Add2WishList(loginId,id,type){
dealId=id
ADD2WISHLIST_TYPE=type
if(loginId==""){
window.location.href=SITEURL+"login"}
else{
ADD2WISHLIST_xmlHttp=ADD2WISHLIST_GetXmlHttpObject()
if(ADD2WISHLIST_xmlHttp==null){
alert("Browser does not support HTTP Request")
return}
var Add2WishURL=SITEURL+"ajax_response/add2wishlist.php?id="+id+"&type="+type
ADD2WISHLIST_xmlHttp.onreadystatechange=stateADD2WISHLIST
ADD2WISHLIST_xmlHttp.open("GET",Add2WishURL,true)
ADD2WISHLIST_xmlHttp.send(null)}}
function stateADD2WISHLIST(){
if(ADD2WISHLIST_xmlHttp.readyState==4 || ADD2WISHLIST_xmlHttp.readyState=="complete"){
result=ADD2WISHLIST_xmlHttp.responseText
result=result.replace(/^\s+/,'')
document.getElementById('ADDTOFAV'+dealId).style.display="none"
document.getElementById('REMOVETOFAV'+dealId).style.display="block"}}
var RemoveUserid
var RemoveVal
function Remove2Favorite(loginId,id,type,val){
dealId=id
if(val){RemoveVal=val;}
RemoveUserid=loginId
REMOVE2WISHLIST_TYPE=type
if(loginId==""){
window.location.href=SITEURL+"login"}
else{
ADD2WISHLIST_xmlHttp=ADD2WISHLIST_GetXmlHttpObject()
if(ADD2WISHLIST_xmlHttp==null){
alert("Browser does not support HTTP Request")
return}
var REMOVE2WishURL=SITEURL+"ajax_response/remove2wishlist.php?id="+id+"&type="+type
ADD2WISHLIST_xmlHttp.onreadystatechange=stateRemove2WishList
ADD2WISHLIST_xmlHttp.open("GET",REMOVE2WishURL,true)
ADD2WISHLIST_xmlHttp.send(null)}}
function stateRemove2WishList(){
if(ADD2WISHLIST_xmlHttp.readyState==4 || ADD2WISHLIST_xmlHttp.readyState=="complete"){
if(RemoveVal&&RemoveVal!=""){
document.getElementById('ADDTOFAV'+dealId).style.display="block"
document.getElementById('REMOVETOFAV'+dealId).style.display="none"}
else{
showMemberWCS('PROFILETABID',SITEURL+'wishlist.php',RemoveUserid)
ChangeProfileNavigation('PROFILENAV3','PROFILENAV1','PROFILENAV2','PROFILENAV4','PROFILENAV5')
FAVCOUNT=document.getElementById("REMOVEFAVCOUNT1").innerHTML
document.getElementById("REMOVEFAVCOUNT1").innerHTML=parseInt(FAVCOUNT)-1
document.getElementById("REMOVEFAVCOUNT2").innerHTML=parseInt(FAVCOUNT)-1
document.getElementById("REMOVEFAVCOUNT3").innerHTML=parseInt(FAVCOUNT)-1
document.getElementById("REMOVEFAVCOUNT4").innerHTML=parseInt(FAVCOUNT)-1
document.getElementById("REMOVEFAVCOUNT5").innerHTML=parseInt(FAVCOUNT)-1}}}
function ADD2WISHLIST_GetXmlHttpObject(){
var ADD2WISHLIST_xmlHttp=null
try{
ADD2WISHLIST_xmlHttp=new XMLHttpRequest()}
catch(e){
try{
ADD2WISHLIST_xmlHttp=new ActiveXObject("Msxml2.XMLHTTP")}
catch(e){
ADD2WISHLIST_xmlHttp=new ActiveXObject("Microsoft.XMLHTTP")}}
return ADD2WISHLIST_xmlHttp}


var REPORT_xmlHttp
var REPORTsopac=40
var REPORTsopac1=0.40
var REPORTeopac=90
var REPORTeopac1=0.90
var REPORTRespID
var REPORTID
function AjaxReportIssue(id,type){
REPORTID=id
document.getElementById("REPORT"+REPORTID+"E").style.display='none'
document.getElementById("REPORT"+REPORTID+"D").style.display=''
REPORT_xmlHttp=REPORT_GetXmlHttpObject()
if(REPORT_xmlHttp==null){
alert("Browser does not support HTTP Request")
return}
BLOCKID="BLOCK"+REPORTID
document.getElementById(BLOCKID).style.opacity=REPORTsopac1
document.getElementById(BLOCKID).style.filter='alpha(opacity='+REPORTsopac+')'
document.getElementById(BLOCKID).style.mozOpacity=REPORTsopac1
document.getElementById(BLOCKID).style.khtmlOpacity=REPORTsopac1
var REPORTURL=SITEURL+"ajax_response/report.php?id="+id+"&type="+type
REPORT_xmlHttp.onreadystatechange=stateAjaxReportIssue
REPORT_xmlHttp.open("GET",REPORTURL,true)
REPORT_xmlHttp.send(null)}
function stateAjaxReportIssue(){
if(REPORT_xmlHttp.readyState==4 || REPORT_xmlHttp.readyState=="complete"){}}
function REPORT_GetXmlHttpObject(){
var REPORT__xmlHttp=null
try{
REPORT__xmlHttp=new XMLHttpRequest()}
catch(e){
try{
REPORT__xmlHttp=new ActiveXObject("Msxml2.XMLHTTP")}
catch(e){
REPORT__xmlHttp=new ActiveXObject("Microsoft.XMLHTTP")}}
return REPORT__xmlHttp}


var xmlHttptwt
var twtresp
var twtresp_page
var twt_type
function TwtSuggestion(pagename,respid,redirect_page,suggestion,dealid,type){
twtresp=respid
twtresp_page=redirect_page
if(document.getElementById('DealCatId'+dealid)&&suggestion !="Select Category"&&type=="category"){
document.getElementById('DealCatId'+dealid).innerHTML=suggestion+" - "}
if(document.getElementById('DealImageId'+dealid)&&suggestion !=""&&type=="image"){
document.getElementById('DealImageId'+dealid).innerHTML='<img src="'+suggestion+'" alt=""  border="0" height="49" width="49" />'}
xmlHttptwt=GetXmlHttpObject()
if(xmlHttptwt==null){
alert("Browser does not support HTTP Request")
return}
var url=pagename
xmlHttptwt.onreadystatechange=stateTwtSuggestion
xmlHttptwt.open("GET",url,true)
xmlHttptwt.send(null)}
function stateTwtSuggestion(){
if(xmlHttptwt.readyState==4 || xmlHttptwt.readyState=="complete"){
result=xmlHttptwt.responseText}}
function GetXmlHttpObject(){
var xmlHttptwt=null
try{
xmlHttptwt=new XMLHttpRequest()}
catch(e){
try{
xmlHttptwt=new ActiveXObject("Msxml2.XMLHTTP")}
catch(e){
xmlHttptwt=new ActiveXObject("Microsoft.XMLHTTP")}}
return xmlHttptwt}
function ShowHideSuggestion(id,tval,val){
for(s=1;s<=tval;s++){
if(document.getElementById('suggestion'+s)&&id!=s)
document.getElementById('suggestion'+s).style.display='none'
if(document.getElementById('suggestion_report'+s)&&id!="_report"+s)
document.getElementById('suggestion_report'+s).style.display='none'}
if(val==null){
if(document.getElementById('suggestion'+id).style.display=='none'){
document.getElementById('suggestion'+id).style.display='';}
else{
document.getElementById('suggestion'+id).style.display='none';}}}
