
function permalink($data)
{prompt('Below is a permanent link to this article, share it with friends and people who may be interested in it by copying the link in the text box.',$data);}
function permalink_global($data)
{prompt('Below is a permanent link to this page, share it with friends and people who may be interested in it by copying the link in the text box.',$data);}
function showprompt($text,$data)
{prompt($text,$data);}
function skip(maxpages,url,end)
{var response=prompt("Please specify a page number between 1 and "+maxpages+" which you wish to skip to");if(response)
{window.location=url+response+end;}}
function dologout()
{a=alert('Are you sure you want to logout?');if(a==true)
{window.location='http://www.google.com';}}
function broadcast_zooming(s,m,c)
{var d=document.getElementById(m);var c=document.getElementById(c);var td=document.getElementById(s);if(td.style.state=='0'){d.style.visibility="visible";d.style.display="block";d.rowspan="2";td.style.state="1";td.innerHTML="Zoom In +";}else{d.style.visibility="hidden";d.style.display="none";td.style.state="0";td.innerHTML="Zoom Out -";}}
function collapseAll()
{var menuDiv=document.getElementById("menu");var divs=menuDiv.getElementsByTagName("div");var div;for(i=0;i<divs.length;i++)
{div=divs[i];div.style.visibility="hidden";div.style.display="none";}}
function expand(s,m)
{var browser=window.navigator.appName;var dif=0;if(browser!="Microsoft Internet Explorer"){dif=12;}
var d=document.getElementById(m);var td=document.getElementById(s);var left=td.offsetLeft;var top=td.offsetTop+58;var width=td.offsetWidth-dif;d.style.visibility="visible";d.style.display="block";}
function collapse(s,m)
{var d=document.getElementById(m);var td=document.getElementById(s);d.style.visibility="hidden";d.style.display="none";}
function get_me_an_answer(text_box_name){var my_text_box_contents=document.getElementById(text_box_name).value;var full_desination="http://www.rockstarwatch.net/qna?q="+my_text_box_contents;window.open(full_desination,"_self","");return false;}
function MM_swapImgRestore(){var i,x,a=document.MM_sr;for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++)x.src=x.oSrc;}
function MM_preloadImages(){var d=document;if(d.images){if(!d.MM_p)d.MM_p=new Array();var i,j=d.MM_p.length,a=MM_preloadImages.arguments;for(i=0;i<a.length;i++)
if(a[i].indexOf("#")!=0){d.MM_p[j]=new Image;d.MM_p[j++].src=a[i];}}}
function MM_findObj(n,d){var p,i,x;if(!d)d=document;if((p=n.indexOf("?"))>0&&parent.frames.length){d=parent.frames[n.substring(p+1)].document;n=n.substring(0,p);}
if(!(x=d[n])&&d.all)x=d.all[n];for(i=0;!x&&i<d.forms.length;i++)x=d.forms[i][n];for(i=0;!x&&d.layers&&i<d.layers.length;i++)x=MM_findObj(n,d.layers[i].document);if(!x&&d.getElementById)x=d.getElementById(n);return x;}
function MM_swapImage(){var i,j=0,x,a=MM_swapImage.arguments;document.MM_sr=new Array;for(i=0;i<(a.length-2);i+=3)
if((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x;if(!x.oSrc)x.oSrc=x.src;x.src=a[i+2];}}<!--Base code from http:var min=8;var max=18;function increaseFontSize(tag){var p=document.getElementsByTagName(tag);for(i=0;i<p.length;i++){if(p[i].style.fontSize){var s=parseInt(p[i].style.fontSize.replace("px",""));}else{var s=12;}
if(s!=max){s+=1;}
p[i].style.fontSize=s+"px"}}
function decreaseFontSize(tag){var p=document.getElementsByTagName(tag);for(i=0;i<p.length;i++){if(p[i].style.fontSize){var s=parseInt(p[i].style.fontSize.replace("px",""));}else{var s=12;}
if(s!=min){s-=1;}
p[i].style.fontSize=s+"px"}}
function showHide(id){if(document.getElementById){obj=document.getElementById(id);if(obj.style.display=="none"){obj.style.display="";}else{obj.style.display="none";}}}
function makeObject(){var x;if(window.ActiveXObject){x=new ActiveXObject("Microsoft.XMLHTTP");}else if(window.XMLHttpRequest){x=new XMLHttpRequest();}
return x;}
var request=makeObject();var the_content;function change_contact(the_content){request.open('get',the_content);request.onreadystatechange=parseCheck_content;request.send('');}
function parseCheck_content(){if(request.readyState==1){document.getElementById('contact').innerHTML='<br />Loading...<br />';}
if(request.readyState==4){var answer=request.responseText;document.getElementById('contact').innerHTML=answer;}}
function menuToggle(idA,idB){if(document.getElementById(idA).style.display="none"){document.getElementById(idA).style.display="";}else{document.getElementById(idA).style.display="none";}}
function RsW_swapImgRestore(){var i,x,a=document.RsW_sr;for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++)x.src=x.oSrc;}
function RsW_preloadImages(){var d=document;if(d.images){if(!d.RsW_p)d.RsW_p=new Array();var i,j=d.RsW_p.length,a=RsW_preloadImages.arguments;for(i=0;i<a.length;i++)
if(a[i].indexOf("#")!=0){d.RsW_p[j]=new Image;d.RsW_p[j++].src=a[i];}}}
function RsW_findObj(n,d){var p,i,x;if(!d)d=document;if((p=n.indexOf("?"))>0&&parent.frames.length){d=parent.frames[n.substring(p+1)].document;n=n.substring(0,p);}
if(!(x=d[n])&&d.all)x=d.all[n];for(i=0;!x&&i<d.forms.length;i++)x=d.forms[i][n];for(i=0;!x&&d.layers&&i<d.layers.length;i++)x=RsW_findObj(n,d.layers[i].document);if(!x&&d.getElementById)x=d.getElementById(n);return x;}
function RsW_swapImage(){var i,j=0,x,a=RsW_swapImage.arguments;document.RsW_sr=new Array;for(i=0;i<(a.length-2);i+=3)
if((x=RsW_findObj(a[i]))!=null){document.RsW_sr[j++]=x;if(!x.oSrc)x.oSrc=x.src;x.src=a[i+2];}}
function ddtabcontent(tabinterfaceid){this.tabinterfaceid=tabinterfaceid
this.tabs=document.getElementById(tabinterfaceid).getElementsByTagName("a")
this.enabletabpersistence=true
this.hottabspositions=[]
this.currentTabIndex=0
this.subcontentids=[]
this.revcontentids=[]
this.selectedClassTarget="link"}
ddtabcontent.getCookie=function(Name){var re=new RegExp(Name+"=[^;]+","i");if(document.cookie.match(re))
return document.cookie.match(re)[0].split("=")[1]
return""}
ddtabcontent.setCookie=function(name,value){document.cookie=name+"="+value+";path=/"}
ddtabcontent.prototype={expandit:function(tabid_or_position){this.cancelautorun()
var tabref=""
try{if(typeof tabid_or_position=="string"&&document.getElementById(tabid_or_position).getAttribute("rel"))
tabref=document.getElementById(tabid_or_position)
else if(parseInt(tabid_or_position)!=NaN&&this.tabs[tabid_or_position].getAttribute("rel"))
tabref=this.tabs[tabid_or_position]}
catch(err){alert("Invalid Tab ID or position entered!")}
if(tabref!="")
this.expandtab(tabref)},cycleit:function(dir,autorun){if(dir=="next"){var currentTabIndex=(this.currentTabIndex<this.hottabspositions.length-1)?this.currentTabIndex+1:0}
else if(dir=="prev"){var currentTabIndex=(this.currentTabIndex>0)?this.currentTabIndex-1:this.hottabspositions.length-1}
if(typeof autorun=="undefined")
this.cancelautorun()
this.expandtab(this.tabs[this.hottabspositions[currentTabIndex]])},setpersist:function(bool){this.enabletabpersistence=bool},setselectedClassTarget:function(objstr){this.selectedClassTarget=objstr||"link"},getselectedClassTarget:function(tabref){return(this.selectedClassTarget==("linkparent".toLowerCase()))?tabref.parentNode:tabref},urlparamselect:function(tabinterfaceid){var result=window.location.search.match(new RegExp(tabinterfaceid+"=(\\d+)","i"))
return(result==null)?null:parseInt(RegExp.$1)},expandtab:function(tabref){var subcontentid=tabref.getAttribute("rel")
var associatedrevids=(tabref.getAttribute("rev"))?","+tabref.getAttribute("rev").replace(/\s+/,"")+",":""
this.expandsubcontent(subcontentid)
this.expandrevcontent(associatedrevids)
for(var i=0;i<this.tabs.length;i++){this.getselectedClassTarget(this.tabs[i]).className=(this.tabs[i].getAttribute("rel")==subcontentid)?"selected":""}
if(this.enabletabpersistence)
ddtabcontent.setCookie(this.tabinterfaceid,tabref.tabposition)
this.setcurrenttabindex(tabref.tabposition)},expandsubcontent:function(subcontentid){for(var i=0;i<this.subcontentids.length;i++){var subcontent=document.getElementById(this.subcontentids[i])
subcontent.style.display=(subcontent.id==subcontentid)?"block":"none"}},expandrevcontent:function(associatedrevids){var allrevids=this.revcontentids
for(var i=0;i<allrevids.length;i++){document.getElementById(allrevids[i]).style.display=(associatedrevids.indexOf(","+allrevids[i]+",")!=-1)?"block":"none"}},setcurrenttabindex:function(tabposition){for(var i=0;i<this.hottabspositions.length;i++){if(tabposition==this.hottabspositions[i]){this.currentTabIndex=i
break}}},autorun:function(){this.cycleit('next',true)},cancelautorun:function(){if(typeof this.autoruntimer!="undefined")
clearInterval(this.autoruntimer)},init:function(automodeperiod){var persistedtab=ddtabcontent.getCookie(this.tabinterfaceid)
var selectedtab=-1
var selectedtabfromurl=this.urlparamselect(this.tabinterfaceid)
this.automodeperiod=automodeperiod||0
for(var i=0;i<this.tabs.length;i++){this.tabs[i].tabposition=i
if(this.tabs[i].getAttribute("rel")){var tabinstance=this
this.hottabspositions[this.hottabspositions.length]=i
this.subcontentids[this.subcontentids.length]=this.tabs[i].getAttribute("rel")
this.tabs[i].onclick=function(){tabinstance.expandtab(this)
tabinstance.cancelautorun()
return false}
if(this.tabs[i].getAttribute("rev")){this.revcontentids=this.revcontentids.concat(this.tabs[i].getAttribute("rev").split(/\s*,\s*/))}
if(selectedtabfromurl==i||this.enabletabpersistence&&selectedtab==-1&&parseInt(persistedtab)==i||!this.enabletabpersistence&&selectedtab==-1&&this.getselectedClassTarget(this.tabs[i]).className=="selected"){selectedtab=i}}}
if(selectedtab!=-1)
this.expandtab(this.tabs[selectedtab])
else
this.expandtab(this.tabs[this.hottabspositions[0]])
if(parseInt(this.automodeperiod)>500&&this.hottabspositions.length>1){this.autoruntimer=setInterval(function(){tabinstance.autorun()},this.automodeperiod)}}}