function allow_numeric(obj){
 if (/[^0-9]/i.test(obj.value))
  obj.value=obj.value.replace(/[^0-9]/g,'')
  obj.value+=''
  obj.focus()
}


var xmlHttp

var rpage = 'http://comics.gpanalysis.com/gpaforcomics_login.asp?eid=6'
var rpage2 = 'gpaforcomics_reportsales.asp?eid=6'
var ImRunning = false;



//--------------------------------------------------------------------------
function showliveauctionlinks(str,counter)
{

//if ( document.getElementById(counter).style.display == 'none' ) {

//alert ('counterID:'+counter+' style:'+document.getElementById(counter).style.display);

  if (!ImRunning) {
    ImRunning = true;
    xmlHttp=GetXmlHttpObject();
    if (xmlHttp==null) {
      alert ("Your browser does not support AJAX!");
      ImRunning = false;
      return;
    }	
var url="liveauctionlinks.asp";
url=url+"?q="+str;
url=url+"&sid="+Math.random();
xmlHttp.onreadystatechange=stateChangedLive;
//xmlHttp.open("GET",url,true);
theLiveCounter = counter;

	url2="collapse.asp";
	
	if (document.getElementById(theLiveCounter).style.display == 'none')
	{
	xmlHttp.open("GET",url,true);
	}
	else
	{
	xmlHttp.open("GET",url2,true);
	}

showHideLive();
xmlHttp.send(null);
}
//}

//else
//{
//alert ('already open');
//theLiveCounter = counter;
//xmlHttp.onreadystatechange=stateChangedLive;
//showHideLive();
//}

}

//============================================
function stateChangedLive() 
{ 
if (xmlHttp.readyState==4)
{
	
var whatWasReturned = xmlHttp.responseText;
var pos = whatWasReturned.indexOf("i2iSOi2i"); 
if (pos == -1)
{
document.getElementById(theLiveCounter).innerHTML=xmlHttp.responseText;
//document.getElementById(theLiveCounter).style.display = '';
//HideAjaxLoaderImageWorking4();
ImRunning = false;
}
else
{
ImRunning = false;
window.location = rpage;
}
}
}

function showHideLive()
{

if (document.getElementById(theLiveCounter).style.display == 'none')
{
document.getElementById(theLiveCounter).style.display = '';
} 
else 
{
document.getElementById(theLiveCounter).style.display = 'none';
}
} 









function showSerialNumberDetails(str,counter,showhighlows,expandyears)
{
  if (!ImRunning) {
    ImRunning = true;
    xmlHttp=GetXmlHttpObject();
    if (xmlHttp==null) {
      alert ("Your browser does not support AJAX!");
      ImRunning = false;
      return;
    }
var url="getlast10sales.asp";
url=url+"?q="+str;
url=url+"&counter="+counter;
url=url+"&showhighlows="+showhighlows;
url=url+"&expandyears="+expandyears;
url=url+"&sid="+Math.random();
xmlHttp.onreadystatechange=stateChanged2;
theCounter = counter;


url2="collapsemycomics3.asp";

if (document.getElementById(theCounter).style.display == '')
{
xmlHttp.open("GET",url2,true);
}
else
{
xmlHttp.open("GET",url,true);
}

showhighlows = showhighlows;
showHide2();
xmlHttp.send(null);
}
}

function showSerialNumberDetails2(str,counter,showhighlows,expandyears)
{
  if (!ImRunning) {
    ImRunning = true;
    xmlHttp=GetXmlHttpObject();
    if (xmlHttp==null) {
      alert ("Your browser does not support AJAX!");
      ImRunning = false;
      return;
    }
var url="getlast10sales2.asp";
url=url+"?q="+str;
url=url+"&counter="+counter;
url=url+"&showhighlows="+showhighlows;
url=url+"&expandyears="+expandyears;
url=url+"&sid="+Math.random();
xmlHttp.onreadystatechange=stateChanged3;
theCounter = counter;

url2="collapsemycomics4.asp";

if (document.getElementById(theCounter).style.display == '')
{
xmlHttp.open("GET",url2,true);
}
else
{
xmlHttp.open("GET",url,true);
}

showhighlows = showhighlows;
showHide3();
xmlHttp.send(null);
}
}

function showtitlesearch(str,counter)
{
  if (!ImRunning) {
    ImRunning = true;
    xmlHttp=GetXmlHttpObject();
    if (xmlHttp==null) {
      alert ("Your browser does not support AJAX!");
      ImRunning = false;
      return;
    }
var url="showtitlesearch.asp";
url=url+"?q="+str;
url=url+"&counter="+counter;
url=url+"&sid="+Math.random();
xmlHttp.onreadystatechange=stateChanged;
xmlHttp.open("GET",url,true);
theCounter = counter;
showHide();
xmlHttp.send(null);
}
}


function showtitlesearch_peds(str,counter)
{
  if (!ImRunning) {
    ImRunning = true;
    xmlHttp=GetXmlHttpObject();
    if (xmlHttp==null) {
      alert ("Your browser does not support AJAX!");
      ImRunning = false;
      return;
    }
var url="showtitlesearch_peds.asp";
url=url+"?q="+str;
url=url+"&counter="+counter;
url=url+"&sid="+Math.random();
xmlHttp.onreadystatechange=stateChanged;
xmlHttp.open("GET",url,true);
theCounter = counter;
showHide();
xmlHttp.send(null);
}
}




function showissues(str,counter)
{
  if (!ImRunning) {
    ImRunning = true;
    xmlHttp=GetXmlHttpObject();
    if (xmlHttp==null) {
      alert ("Your browser does not support AJAX!");
      ImRunning = false;
      return;
    }
var url="showtitleissues.asp";
url=url+"?q="+str;
url=url+"&counter="+counter;
url=url+"&sid="+Math.random();
xmlHttp.onreadystatechange=stateChanged;
xmlHttp.open("GET",url,true);
theCounter = counter;
//showHide(); //keep this like this

xmlHttp.send(null);
}
}



function showissues_peds(str,str2,counter)
{
  if (!ImRunning) {
    ImRunning = true;
    xmlHttp=GetXmlHttpObject();
    if (xmlHttp==null) {
      alert ("Your browser does not support AJAX!");
      ImRunning = false;
      return;
    }
var url="showtitleissues_peds.asp";
url=url+"?q="+str;
url=url+"&q2="+str2;
url=url+"&counter="+counter;
url=url+"&sid="+Math.random();
xmlHttp.onreadystatechange=stateChanged;
xmlHttp.open("GET",url,true);
theCounter = counter;
//showHide(); keep this like this

xmlHttp.send(null);
}
}


function showissues_try(str,counter)
{
  if (!ImRunning) {
    ImRunning = true;
    xmlHttp=GetXmlHttpObject();
    if (xmlHttp==null) {
      alert ("Your browser does not support AJAX!");
      ImRunning = false;
      return;
    }
var url="showtitleissues_try.asp";
url=url+"?q="+str;
url=url+"&counter="+counter;
url=url+"&sid="+Math.random();
xmlHttp.onreadystatechange=stateChanged;
xmlHttp.open("GET",url,true);
theCounter = counter;
//showHide(); keep this like this

xmlHttp.send(null);
}
}














function addCGCsale(certnumber,pricesold,datesold,soldto,additionalinfo,addORdelete)
{
  if (!ImRunning) {
    ImRunning = true;
    xmlHttp=GetXmlHttpObject();
    if (xmlHttp==null) {
      alert ("Your browser does not support AJAX!");
      ImRunning = false;
      return;
    }
var url="addCGCsale.asp";
url=url+"?certnumber="+certnumber;
url=url+"&pricesold="+pricesold;
url=url+"&datesold="+datesold;
url=url+"&soldto="+soldto;
url=url+"&additionalinfo="+additionalinfo;
url=url+"&addORdelete="+addORdelete;
url=url+"&sid="+Math.random();
xmlHttp.onreadystatechange=stateChangedForaddCGCsale;
xmlHttp.open("GET",url,true);
//theCounter = counter;
showHideAddCGCSale();
xmlHttp.send(null);
}
}


function addCGCsaleMass(submitmass,addORdelete)
{
  if (!ImRunning) {
    ImRunning = true;
    xmlHttp=GetXmlHttpObject();
    if (xmlHttp==null) {
      alert ("Your browser does not support AJAX!");
      ImRunning = false;
      return;
    }
var url="addCGCsale.asp";
var str=escape(submitmass);
str = str.replace(/%0D%0A/g, "");
str = str.replace(/%0A/g, "");
//alert(str);
var params= "addORdelete=3&submitmass="+str;
//url=url+"?submitmass="+submitmass;
//url=url+"&addORdelete="+addORdelete;
//url=url+"&sid="+Math.random();
xmlHttp.onreadystatechange=stateChangedForaddCGCsale;
//xmlHttp.open("GET",url,true);
xmlHttp.open("POST",url,true);

xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlHttp.setRequestHeader("Content-length", params.length);
xmlHttp.setRequestHeader("Connection", "close");

showHideAddCGCSale();
//xmlHttp.send(null);
xmlHttp.send(params);
}
}



function showHideAddCGCSale()
{
if (document.getElementById('submissiondetails').style.display == 'none')
{
document.getElementById('submissiondetails').style.display = '';
} 
else 
{
document.getElementById('submissiondetails').style.display = 'none';
}
} 

function stateChangedForaddCGCsale() 
{ 
if (xmlHttp.readyState==4)
{
	
var whatWasReturned = xmlHttp.responseText;
var pos = whatWasReturned.indexOf("i2iSOi2i"); 
if (pos == -1)
{
document.getElementById('submissiondetails').innerHTML=xmlHttp.responseText;
document.getElementById('submissiondetails').style.display = '';
HideAjaxLoaderImageForAddingCGCsale();
ImRunning = false;
}
else
{
ImRunning = false;
window.location = rpage2;
}
}
}

function ShowAjaxLoaderImageForAddingCGCsale()
{
textforimage = "ajaxloaderimage";
//theajaxcounter = ajaxcounter;
//textandcounter = textforimage+theajaxcounter;
document.getElementById(textforimage).style.display="block";
}

function HideAjaxLoaderImageForAddingCGCsale()
{
textforimage = "ajaxloaderimage";
//theajaxcounter = ajaxcounter;
//textandcounter = textforimage+theajaxcounter;
//alert("textandcounter:"+textandcounter);
document.getElementById(textforimage).style.display="none";
}
















function showgrades(str,issue,counter,counternext)
{
  if (!ImRunning) {
    ImRunning = true;
    xmlHttp=GetXmlHttpObject();
    if (xmlHttp==null) {
      alert ("Your browser does not support AJAX!");
      ImRunning = false;
      return;
    }

var url="showgrades.asp";
url=url+"?q="+str;
url=url+"&issue="+issue;
url=url+"&counter="+counter;
url=url+"&sid="+Math.random();
xmlHttp.onreadystatechange=stateChanged222;
//xmlHttp.onreadystatechange=stateChanged2;
theCounter = counter;


url2="collapsemycomics2.asp";

if (document.getElementById(theCounter).style.display == '')
{
xmlHttp.open("GET",url2,true);
}
else
{
xmlHttp.open("GET",url,true);
}

theCounterNextNext = counternext;

showHide222();
//showHide2();
xmlHttp.send(null);
}
}



function showgrades_try(str,issue,counter,counternext)
{
  if (!ImRunning) {
    ImRunning = true;
    xmlHttp=GetXmlHttpObject();
    if (xmlHttp==null) {
      alert ("Your browser does not support AJAX!");
      ImRunning = false;
      return;
    }
var url="showgrades_try.asp";
url=url+"?q="+str;
url=url+"&issue="+issue;
url=url+"&counter="+counter;
url=url+"&sid="+Math.random();
xmlHttp.onreadystatechange=stateChanged222;
theCounter = counter;

url2="collapsemycomics2.asp";

if (document.getElementById(theCounter).style.display == '')
{
xmlHttp.open("GET",url2,true);
}
else
{
xmlHttp.open("GET",url,true);
}

theCounterNextNext = counternext;
showHide222();
xmlHttp.send(null);
}
}




function showgrades_frommycomics(str,issue,countertwo,ajaxcountertwo,counternext)
{
  if (!ImRunning) {
    ImRunning = true;
    xmlHttp=GetXmlHttpObject();
    if (xmlHttp==null) {
      alert ("Your browser does not support AJAX!");
      ImRunning = false;
      return;
    }
var url="showgrades_mycomics.asp";
url=url+"?q="+str;
url=url+"&issue="+issue;
url=url+"&counter="+countertwo;
url=url+"&ajaxcounter="+ajaxcountertwo;
url=url+"&sid="+Math.random();
xmlHttp.onreadystatechange=stateChanged8;
xmlHttp.open("GET",url,true);
theCountertwo = countertwo;
theCounterNext = counternext;
var theajaxcountertwo = ajaxcountertwo;
showHide8();
xmlHttp.send(null);
}
}


function showgradestop(str)
{
  if (!ImRunning) {
    ImRunning = true;
    xmlHttp=GetXmlHttpObject();
    if (xmlHttp==null) {
      alert ("Your browser does not support AJAX!");
      ImRunning = false;
      return;
    }
var url="showgradestop.asp";
url=url+"?q="+str;
url=url+"&sid="+Math.random();
xmlHttp.onreadystatechange=stateChanged;
xmlHttp.open("GET",url,true);
theCounter = str;
showHide();
xmlHttp.send(null);
}
}


function addtomytitles(str,addordelete,counter)
{
  if (!ImRunning) {
    ImRunning = true;
    xmlHttp=GetXmlHttpObject();
    if (xmlHttp==null) {
      alert ("Your browser does not support AJAX!");
      ImRunning = false;
      return;
    }
var url="addtomytitles.asp";
url=url+"?q="+str;
url=url+"&addordelete="+addordelete;
url=url+"&counter="+counter;
url=url+"&sid="+Math.random();
xmlHttp.onreadystatechange=stateChanged;
xmlHttp.open("GET",url,true);
theCounter = counter;
showHide();

xmlHttp.send(null);
}
}




function addtomytitles_liveauctions(str,addordelete,counter)
{
  if (!ImRunning) {
    ImRunning = true;
    xmlHttp=GetXmlHttpObject();
    if (xmlHttp==null) {
      alert ("Your browser does not support AJAX!");
      ImRunning = false;
      return;
    }
var url="addtomytitles_liveauctions.asp";
url=url+"?q="+str;
url=url+"&addordelete="+addordelete;
url=url+"&counter="+counter;
url=url+"&sid="+Math.random();
xmlHttp.onreadystatechange=stateChangedLiveMyTitles;
xmlHttp.open("GET",url,true);
theCounter = counter;
showHide();

xmlHttp.send(null);
}
}

//============================================
function stateChangedLiveMyTitles() 
{ 
if (xmlHttp.readyState==4)
{
	
var whatWasReturned = xmlHttp.responseText;
var pos = whatWasReturned.indexOf("i2iSOi2i"); 
if (pos == -1)
{

document.getElementById(theCounter).innerHTML=xmlHttp.responseText;
document.getElementById(theCounter).style.display = '';
//HideAjaxLoaderImage();
//HideAjaxLoaderImageWorking2();
//HideAjaxLoaderImageWorking3();
//HideAjaxLoaderImageWorking4();
ImRunning = false;
}
else
{
ImRunning = false;
window.location = rpage;
}
}
}



function addtomytitles_try(str,addordelete,counter)
{
  if (!ImRunning) {
    ImRunning = true;
    xmlHttp=GetXmlHttpObject();
    if (xmlHttp==null) {
      alert ("Your browser does not support AJAX!");
      ImRunning = false;
      return;
    }
var url="addtomytitles_try.asp";
url=url+"?q="+str;
url=url+"&addordelete="+addordelete;
url=url+"&counter="+counter;
url=url+"&sid="+Math.random();
xmlHttp.onreadystatechange=stateChanged;
xmlHttp.open("GET",url,true);
theCounter = counter;
showHide();

xmlHttp.send(null);
}
}



function logindetails(stru,strp,counter)
{
  if (!ImRunning) {
    ImRunning = true;
    xmlHttp=GetXmlHttpObject();
    if (xmlHttp==null) {
      alert ("Your browser does not support AJAX!");
      ImRunning = false;
      return;
    }
var url="dologin.asp";
url=url+"?q="+stru;
url=url+"&r="+strp;
url=url+"&counter="+counter;
url=url+"&sid="+Math.random();
xmlHttp.onreadystatechange=stateChanged;
xmlHttp.open("GET",url,true);
theCounter = counter;
showHide();
xmlHttp.send(null);
}
}


function addtomycomics(str,counter)
{
  if (!ImRunning) {
    ImRunning = true;
    xmlHttp=GetXmlHttpObject();
    if (xmlHttp==null) {
      alert ("Your browser does not support AJAX!");
      ImRunning = false;
      return;
    }
var url="addtomycomics.asp";
url=url+"?q="+str;
url=url+"&counter="+counter;
url=url+"&sid="+Math.random();
xmlHttp.onreadystatechange=stateChanged;
xmlHttp.open("GET",url,true);
theCounter = counter;
showHide();
xmlHttp.send(null);
}
}


function removefrommycomics(str,counter)
{
  if (!ImRunning) {
    ImRunning = true;
    xmlHttp=GetXmlHttpObject();
    if (xmlHttp==null) {
      alert ("Your browser does not support AJAX!");
      ImRunning = false;
      return;
    }
var url="removefrommycomics.asp";
url=url+"?q="+str;
url=url+"&counter="+counter;
url=url+"&sid="+Math.random();
xmlHttp.onreadystatechange=stateChangedRemove;
xmlHttp.open("GET",url,true);
theCounter = counter;
showHide();
xmlHttp.send(null);
}
}


function addapurchase_submit(strA,strB,strC,avgprice,deletepurchase,counter,ajaxcounter)
{
  if (!ImRunning) {
    ImRunning = true;
    xmlHttp=GetXmlHttpObject();
    if (xmlHttp==null) {
      alert ("Your browser does not support AJAX!");
      ImRunning = false;
      return;
    }
var url="addapurchase_submit.asp";
url=url+"?q="+strA;
url=url+"&r="+strB;
url=url+"&s="+strC;
url=url+"&avgprice="+avgprice;
url=url+"&deletepurchase="+deletepurchase;
url=url+"&ajaxcounter="+ajaxcounter;
url=url+"&counter="+counter;
url=url+"&sid="+Math.random();
//alert(strA+","+strB+","+strC+","+avgprice+","+deletepurchase+","+counter+","+ajaxcounter);
xmlHttp.onreadystatechange=stateChanged7;
xmlHttp.open("GET",url,true);
theCounter = counter;
var theajaxcounter = ajaxcounter;
showHide7();
xmlHttp.send(null);
}
}



function addapurchase_submit2(strA,strB,strC,avgprice,deletepurchase,counter)
{
  if (!ImRunning) {
    ImRunning = true;
    xmlHttp=GetXmlHttpObject();
    if (xmlHttp==null) {
      alert ("Your browser does not support AJAX!");
      ImRunning = false;
      return;
    }
var url="addapurchase_submit.asp";
url=url+"?q="+strA;
url=url+"&r="+strB;
url=url+"&s="+strC;
url=url+"&avgprice="+avgprice;
url=url+"&deletepurchase="+deletepurchase;
//url=url+"&ajaxcounter="+ajaxcounter;
url=url+"&counter="+counter;
url=url+"&sid="+Math.random();
//alert(strA+","+strB+","+strC+","+avgprice+","+deletepurchase+","+counter+","+ajaxcounter);
xmlHttp.onreadystatechange=stateChanged7b;
xmlHttp.open("GET",url,true);
theCounter = counter;
//var theajaxcounter = ajaxcounter;
showHide7();
xmlHttp.send(null);
}
}


function addapurchase(str,avgprice,counter)
{
  if (!ImRunning) {
    ImRunning = true;
    xmlHttp=GetXmlHttpObject();
    if (xmlHttp==null) {
      alert ("Your browser does not support AJAX!");
      ImRunning = false;
      return;
    }
var url="addapurchase.asp";
url=url+"?q="+str;
url=url+"&avgprice="+avgprice;
url=url+"&counter="+counter;
url=url+"&sid="+Math.random();
//xmlHttp.onreadystatechange=stateChanged;
xmlHttp.onreadystatechange=stateChanged9;
xmlHttp.open("GET",url,true);
theAddPurchaseCounter = counter;
//showHide();
showHide9();
xmlHttp.send(null);
}
}



function showMyComics(str,titleid,counter,counternext)
{
  if (!ImRunning) {
    ImRunning = true;
    xmlHttp=GetXmlHttpObject();
    if (xmlHttp==null) {
      alert ("Your browser does not support AJAX!");
      ImRunning = false;
      return;
    }
var url="mycomics_main.asp";
url=url+"?q="+str;
url=url+"&titleid="+titleid;
url=url+"&counter="+counter;
url=url+"&sid="+Math.random();
xmlHttp.onreadystatechange=stateChanged5;
xmlHttp.open("GET",url,true);
theCounter = counter;
theCounterNext = counternext;
showHide5();
xmlHttp.send(null);
}
}




function getTheNextCounter()
{
if (theCounterNext == "")
{
	//alert('OK')
	//window.location.href = "gpaforcomics_login.asp?eid=6"
}
else
{
}
}

function showHide222()
{
	
if (theCounterNextNext == "")
{
	window.location.href = "gpaforcomics_login.asp?eid=6"
}
else
{

if (document.getElementById(theCounter).style.display == 'none')
{
document.getElementById(theCounter).style.display = '';
} 
else 
{
document.getElementById(theCounter).style.display = 'none';
}

}

} 



//============================================
function stateChanged222() 
{ 
if (xmlHttp.readyState==4)
{
	
var whatWasReturned = xmlHttp.responseText;
var pos = whatWasReturned.indexOf("i2iSOi2i"); 
if (pos == -1)
{
document.getElementById(theCounter).innerHTML=xmlHttp.responseText;
ImRunning = false;
}
else
{
ImRunning = false;
window.location = rpage;
}
}
}	




function showHide()
{

if (document.getElementById(theCounter).style.display == 'none')
{
document.getElementById(theCounter).style.display = '';
} 
else 
{
document.getElementById(theCounter).style.display = 'none';
}
} 



function showHide2()
{
if (document.getElementById(theCounter).style.display == 'none')
{
document.getElementById(theCounter).style.display = '';
} 
else 
{
document.getElementById(theCounter).style.display = 'none';
}

} 


function showHide3()
{

if (document.getElementById(theCounter).style.display == 'none')
{
document.getElementById(theCounter).style.display = '';
} 
else 
{
document.getElementById(theCounter).style.display = 'none';
}

} 



function showHide4()
{

if (document.getElementById(theCounter).style.display == 'none')
{
document.getElementById(theCounter).style.display = '';
} 
else 
{
document.getElementById(theCounter).style.display = 'none';
}

} 





function showHide5()
{
	
if (theCounterNext == "")
{
	window.location.href = "gpaforcomics_login.asp?eid=6"
}
else
{

if (document.getElementById(theCounter).style.display == 'none')
{
document.getElementById(theCounter).style.display = '';
} 
else 
{
document.getElementById(theCounter).style.display = 'none';
}

}

} 

//function showHide5()
//{
//
//if (document.getElementById(theCounter).style.display == 'none')
//{
//document.getElementById(theCounter).style.display = '';
//} 
//else 
//{
//document.getElementById(theCounter).style.display = 'none';
//}
//
//} 



//============================================
function stateChanged() 
{ 
if (xmlHttp.readyState==4)
{
	
var whatWasReturned = xmlHttp.responseText;
var pos = whatWasReturned.indexOf("i2iSOi2i"); 
if (pos == -1)
{

document.getElementById(theCounter).innerHTML=xmlHttp.responseText;
document.getElementById(theCounter).style.display = '';
HideAjaxLoaderImage();
HideAjaxLoaderImageWorking2();
HideAjaxLoaderImageWorking3();
//HideAjaxLoaderImageWorking4();
ImRunning = false;
}
else
{
ImRunning = false;
window.location = rpage;
}
}
}



//============================================
function stateChangedRemove() 
{ 
if (xmlHttp.readyState==4)
{
	
var whatWasReturned = xmlHttp.responseText;
var pos = whatWasReturned.indexOf("i2iSOi2i"); 
if (pos == -1)
{
document.getElementById(theCounter).innerHTML=xmlHttp.responseText;
document.getElementById(theCounter).style.display = '';
ImRunning = false;
}
else
{
ImRunning = false;
window.location = rpage;
}
}
}


//============================================
function stateChanged2() 
{ 
if (xmlHttp.readyState==4)
{
var whatWasReturned = xmlHttp.responseText;
var pos = whatWasReturned.indexOf("i2iSOi2i"); 
if (pos == -1)
{
document.getElementById(theCounter).innerHTML=xmlHttp.responseText;
ImRunning = false;
}
else
{
ImRunning = false;
window.location = rpage;
}
}
}	
	

//============================================
function stateChanged3() 
{ 
if (xmlHttp.readyState==4)
{ 
var whatWasReturned = xmlHttp.responseText;
var pos = whatWasReturned.indexOf("i2iSOi2i"); 
if (pos == -1)
{
document.getElementById(theCounter).innerHTML=xmlHttp.responseText;
ImRunning = false;
}
else
{
ImRunning = false;
window.location = rpage;
}
}
}





//============================================
function stateChanged4() 
{ 
if (xmlHttp.readyState==4)
{ 
var whatWasReturned = xmlHttp.responseText;
var pos = whatWasReturned.indexOf("i2iSOi2i"); 
if (pos == -1)
{
document.getElementById(theCounter).innerHTML=xmlHttp.responseText;
document.getElementById(theCounter).style.display = '';
HideAjaxLoaderImage();
HideAjaxLoaderImageWorking2();
HideAjaxLoaderImageWorking3();
HideAjaxLoaderImageWorking4();
ImRunning = false;
}
else
{
ImRunning = false;
window.location = rpage;
}
}
}



//============================================
function stateChanged5() 
{ 
if (xmlHttp.readyState==4)
{ 
var whatWasReturned = xmlHttp.responseText;
var pos = whatWasReturned.indexOf("i2iSOi2i"); 
if (pos == -1)
{
document.getElementById(theCounter).innerHTML=xmlHttp.responseText;
document.getElementById(theCounter).style.display = '';
HideAjaxLoaderImageWorking5();
ImRunning = false;
}
else
{
ImRunning = false;
window.location = rpage;
}
}
}





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 ShowAjaxLoaderImage()
{
document.getElementById("ajaxloaderimage").style.display="block";
document.getElementById("ajaxloadertext").style.display="block";
}

function HideAjaxLoaderImage()
{
document.getElementById("ajaxloaderimage").style.display="none";
document.getElementById("ajaxloadertext").style.display="none";
}

function ShowAjaxLoaderImageWorking()
{
document.getElementById("ajaxloaderimageworking").style.display="block";
}

function HideAjaxLoaderImageWorking()
{
document.getElementById("ajaxloaderimageworking").style.display="none";
}

function ShowAjaxLoaderImageWorking2()
{
document.getElementById("ajaxloaderimageworking2").style.display="block";
}

function ShowAjaxLoaderImageWorking2B(someg)
{
	someg = someg;
document.getElementById(someg).style.display="block";
}
function HideAjaxLoaderImageWorking2B()
{
	thecounternextUpAgain = thecounternextUp;
document.getElementById("issuegradeloader"+thecounternextUpAgain).style.display="none";
}


function HideAjaxLoaderImageWorking2()
{
document.getElementById("ajaxloaderimageworking2").style.display="none";
}


function ShowAjaxLoaderImageWorking3()
{
document.getElementById("ajaxloaderimageworking3").style.display="block";
}

function HideAjaxLoaderImageWorking3()
{
document.getElementById("ajaxloaderimageworking3").style.display="none";
}


function ShowAjaxLoaderImageWorking4()
{
document.getElementById("ajaxloaderimageworking4").style.display="block";
}

function HideAjaxLoaderImageWorking4()
{
document.getElementById("ajaxloaderimageworking4").style.display="none";
}


function ShowAjaxLoaderImageWorking5()
{
document.getElementById("ajaxloaderimageworking5").style.display="block";
}

function HideAjaxLoaderImageWorking5()
{
document.getElementById("ajaxloaderimageworking5").style.display="none";
}



















function showMyComics(str,titleid,counter)
{
  if (!ImRunning) {
    ImRunning = true;
    xmlHttp=GetXmlHttpObject();
    if (xmlHttp==null) {
      alert ("Your browser does not support AJAX!");
      ImRunning = false;
      return;
    }
var url="mycomics_main.asp";
url=url+"?q="+str;
url=url+"&titleid="+titleid;
url=url+"&counter="+counter;
url=url+"&sid="+Math.random();
xmlHttp.onreadystatechange=stateChanged6;
xmlHttp.open("GET",url,true);
theCounter = counter;
showHide6();
xmlHttp.send(null);
}
}



function showHide6()
{

if (document.getElementById(theCounter).style.display == 'none')
{
document.getElementById(theCounter).style.display = '';
} 
else 
{
document.getElementById(theCounter).style.display = 'none';
}

} 


//============================================
function stateChanged6() 
{ 
if (xmlHttp.readyState==4)
{ 
var whatWasReturned = xmlHttp.responseText;
var pos = whatWasReturned.indexOf("i2iSOi2i"); 
if (pos == -1)
{
document.getElementById(theCounter).innerHTML=xmlHttp.responseText;
document.getElementById(theCounter).style.display = '';
HideAjaxLoaderImage6();
ImRunning = false;
}
else
{
ImRunning = false;
window.location = rpage;
}
}
}





function ShowAjaxLoaderImage6()
{
document.getElementById("ajaxloaderimage6").style.display="block";
}

function HideAjaxLoaderImage6()
{
document.getElementById("ajaxloaderimage6").style.display="none";
}




function showHide7()
{

if (document.getElementById(theCounter).style.display == 'none')
{
document.getElementById(theCounter).style.display = '';
} 
else 
{
document.getElementById(theCounter).style.display = 'none';
}
} 

function stateChanged7() 
{ 
if (xmlHttp.readyState==4)
{
var whatWasReturned = xmlHttp.responseText;
var pos = whatWasReturned.indexOf("i2iSOi2i"); 
if (pos == -1)
{
document.getElementById(theCounter).innerHTML=xmlHttp.responseText;
document.getElementById(theCounter).style.display = '';
HideAjaxLoaderImage7(theajaxcounter);
ImRunning = false;
}
else
{
ImRunning = false;
window.location = rpage;
}
}
}	


function stateChanged7b() 
{ 
if (xmlHttp.readyState==4)
{
var whatWasReturned = xmlHttp.responseText;
var pos = whatWasReturned.indexOf("i2iSOi2i"); 
if (pos == -1)
{
document.getElementById(theCounter).innerHTML=xmlHttp.responseText;
document.getElementById(theCounter).style.display = '';
//HideAjaxLoaderImage7(theajaxcounter);
ImRunning = false;
}
else
{
ImRunning = false;
window.location = rpage;
}
}
}	




function ShowAjaxLoaderImage7(ajaxcounter)
{
textforimage = "ajaxloaderimage";
theajaxcounter = ajaxcounter;
textandcounter = textforimage+theajaxcounter;
document.getElementById(textandcounter).style.display="block";
}

function HideAjaxLoaderImage7(ajaxcounter)
{
textforimage = "ajaxloaderimage";
theajaxcounter = ajaxcounter;
textandcounter = textforimage+theajaxcounter;
//alert("textandcounter:"+textandcounter);
document.getElementById(textandcounter).style.display="none";
}






function showHide8()
{
	
if (theCounterNext == "")
{
	window.location.href = "gpaforcomics_login.asp?eid=6"
}
else
{

if (document.getElementById(theCountertwo).style.display == 'none')
{
document.getElementById(theCountertwo).style.display = '';
} 
else 
{
document.getElementById(theCountertwo).style.display = 'none';
}

}

} 


//function showHide8()
//{
//
//if (document.getElementById(theCountertwo).style.display == 'none')
//{
//document.getElementById(theCountertwo).style.display = '';
//} 
//else 
//{
//document.getElementById(theCountertwo).style.display = 'none';
//}
//} 







function stateChanged8() 
{ 
if (xmlHttp.readyState==4)
{ 
var whatWasReturned = xmlHttp.responseText;
var pos = whatWasReturned.indexOf("i2iSOi2i"); 
if (pos == -1)
{
document.getElementById(theCountertwo).innerHTML=xmlHttp.responseText;
document.getElementById(theCountertwo).style.display = '';
//document.write(theajaxcountertwo);
HideAjaxLoaderImage8(theajaxcountertwo);
ImRunning = false;
}
else
{
ImRunning = false;
window.location = rpage;
}
}
}



function ShowAjaxLoaderImage8(ajaxcountertwo)
{
textforimage = "ajaxloaderimage8";
textfortext = "ajaxloadertext8"
theajaxcountertwo = ajaxcountertwo;
textandcounter = textforimage+theajaxcountertwo;
textandcounterfortext = textfortext+theajaxcountertwo;
//document.getElementById(textandcounter).style.display="block";
//document.getElementById(textandcounterfortext).style.display="block";
document.getElementById(textandcounter).style.display='';
document.getElementById(textandcounterfortext).style.display='';
}

function HideAjaxLoaderImage8(ajaxcountertwo)
{
textforimage = "ajaxloaderimage8";
textfortext = "ajaxloadertext8"
theajaxcountertwo = ajaxcountertwo;
textandcounter = textforimage+theajaxcountertwo;
textandcounterfortext = textfortext+theajaxcountertwo;
document.getElementById(textandcounter).style.display="none";
document.getElementById(textandcounterfortext).style.display="none";
}




function ShowAjaxLoaderImage9(ajaxcountertwoagain)
{
textforimage = "ajaxloaderimage9";
textfortext = "ajaxloadertext9";
theajaxcountertwoagain = ajaxcountertwoagain;
textandcounteragain = textforimage+ajaxcountertwoagain;
textandcounterfortextagain = textfortext+theajaxcountertwoagain;

  {
  alert (textandcounteragain);
  return;
  } 

document.getElementById(textandcounteragain).style.display="block";
document.getElementById(textandcounterfortextagain).style.display="block";
}

function HideAjaxLoaderImage9(ajaxcountertwoagain)
{
textforimage = "ajaxloaderimage9";
textfortext = "ajaxloadertext9";
theajaxcountertwoagain = ajaxcountertwoagain;
textandcounteragain = textforimage+theajaxcountertwoagain;
textandcounterfortextagain = textfortext+theajaxcountertwoagain;
document.getElementById(textandcounteragain).style.display="none";
document.getElementById(textandcounterfortextagain).style.display="none";
}





function showHide9()
{
if (document.getElementById(theAddPurchaseCounter).style.display == 'none')
{
document.getElementById(theAddPurchaseCounter).style.display = '';
} 
else 
{
document.getElementById(theAddPurchaseCounter).style.display = 'none';
}
} 

function stateChanged9() 
{ 
if (xmlHttp.readyState==4)
{ 
var whatWasReturned = xmlHttp.responseText;
var pos = whatWasReturned.indexOf("i2iSOi2i"); 
if (pos == -1)
{
document.getElementById(theAddPurchaseCounter).innerHTML=xmlHttp.responseText;
document.getElementById(theAddPurchaseCounter).style.display = '';
//HideAjaxLoaderImage9();
ImRunning = false;
}
else
{
ImRunning = false;
window.location = rpage;
}
}
}




function collapse_addapurchase(counter)
{
  if (!ImRunning) {
    ImRunning = true;
    xmlHttp=GetXmlHttpObject();
    if (xmlHttp==null) {
      alert ("Your browser does not support AJAX!");
      ImRunning = false;
      return;
    }
var url="collapsemycomics.asp";
url=url+"?counter="+counter;
url=url+"&sid="+Math.random();
//xmlHttp.onreadystatechange=stateChanged;
xmlHttp.onreadystatechange=stateChanged9;
xmlHttp.open("GET",url,true);
theAddPurchaseCounter = counter;
//showHide();
showHide9();
xmlHttp.send(null);
}
}


function collapse_showgrades(counterthree)
{
  if (!ImRunning) {
    ImRunning = true;
    xmlHttp=GetXmlHttpObject();
    if (xmlHttp==null) {
      alert ("Your browser does not support AJAX!");
      ImRunning = false;
      return;
    }
var url="collapsemycomics.asp";
url=url+"?counter="+counterthree;
url=url+"&sid="+Math.random();
xmlHttp.onreadystatechange=stateChanged10;
xmlHttp.open("GET",url,true);
theCounterthree = counterthree;
showHide10();
xmlHttp.send(null);
}
}


function showHide10()
{
if (document.getElementById(theCounterthree).style.display == 'none')
{
document.getElementById(theCounterthree).style.display = '';
} 
else 
{
document.getElementById(theCounterthree).style.display = 'none';
}
} 

function stateChanged10() 
{ 
if (xmlHttp.readyState==4)
{ 
var whatWasReturned = xmlHttp.responseText;
var pos = whatWasReturned.indexOf("i2iSOi2i"); 
if (pos == -1)
{
document.getElementById(theCounterthree).innerHTML=xmlHttp.responseText;
document.getElementById(theCounterthree).style.display = '';
ImRunning = false;
}
else
{
ImRunning = false;
window.location = rpage;
}
}
}







function forceprice(avg90day,pricepaid,counterfour)
{
  if (!ImRunning) {
    ImRunning = true;
    xmlHttp=GetXmlHttpObject();
    if (xmlHttp==null) {
      alert ("Your browser does not support AJAX!");
      ImRunning = false;
      return;
    }
var url="forceprice.asp";
url=url+"?forcecounter="+counterfour;
url=url+"&avg90day="+avg90day;
url=url+"&pricepaid="+pricepaid;
url=url+"&sid="+Math.random();
xmlHttp.onreadystatechange=stateChanged11;
xmlHttp.open("GET",url,true);
thecounterfour = counterfour;
showHide11();
xmlHttp.send(null);
}
}

function showHide11()
{
if (document.getElementById(thecounterfour).style.display == 'none')
{
document.getElementById(thecounterfour).style.display = '';
} 
else 
{
document.getElementById(thecounterfour).style.display = 'none';
}
} 

function stateChanged11() 
{ 
if (xmlHttp.readyState==4)
{ 
var whatWasReturned = xmlHttp.responseText;
var pos = whatWasReturned.indexOf("i2iSOi2i"); 
if (pos == -1)
{
document.getElementById(thecounterfour).innerHTML=xmlHttp.responseText;
document.getElementById(thecounterfour).style.display = '';
ImRunning = false;
}
else
{
ImRunning = false;
window.location = rpage;
}
}
}





function forceprice_submit(avg90day,pricepaid,forcevalue,counterfive)
{
  if (!ImRunning) {
    ImRunning = true;
    xmlHttp=GetXmlHttpObject();
    if (xmlHttp==null) {
      alert ("Your browser does not support AJAX!");
      ImRunning = false;
      return;
    }
var url="forceprice_submit.asp";
url=url+"?forcecounterresult="+counterfive;
url=url+"&avg90day="+avg90day;
url=url+"&pricepaid="+pricepaid;
url=url+"&forcevalue="+forcevalue;
url=url+"&sid="+Math.random();
xmlHttp.onreadystatechange=stateChanged12;
xmlHttp.open("GET",url,true);
thecounterfive = counterfive;
showHide12();
xmlHttp.send(null);
}
}


function showHide12()
{
if (document.getElementById(thecounterfive).style.display == 'none')
{
document.getElementById(thecounterfive).style.display = '';
} 
else 
{
document.getElementById(thecounterfive).style.display = 'none';
}
} 

function stateChanged12() 
{ 
if (xmlHttp.readyState==4)
{ 
var whatWasReturned = xmlHttp.responseText;
var pos = whatWasReturned.indexOf("i2iSOi2i"); 
if (pos == -1)
{
document.getElementById(thecounterfive).innerHTML=xmlHttp.responseText;
document.getElementById(thecounterfive).style.display = '';
ImRunning = false;
}
else
{
ImRunning = false;
window.location = rpage;
}
}
}
